You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
cmd/k8s-operator: avoid port collision with metrics endpoint (tailscale#14185)
When the operator enables metrics on a proxy, it uses the port 9001,
and in the near future it will start using 9002 for the debug endpoint
as well. Make sure we don't choose ports from a range that includes
9001 so that we never clash. Setting TS_SOCKS5_SERVER, TS_HEALTHCHECK_ADDR_PORT,
TS_OUTBOUND_HTTP_PROXY_LISTEN, and PORT could also open arbitrary ports,
so we will need to document that users should not choose ports from the
10000-11000 range for those settings.
Updates tailscale#13406
Signed-off-by: Tom Proctor <[email protected]>
// Calculate a free port to expose on container and add
256
256
// a new PortMap to the ClusterIP Service.
257
-
ifusedPorts.Len() ==maxPorts {
257
+
ifusedPorts.Len() >=maxPorts {
258
258
// TODO(irbekrm): refactor to avoid extra reconciles here. Low priority as in practice,
259
259
// the limit should not be hit.
260
260
returnnil, false, fmt.Errorf("unable to allocate additional ports on ProxyGroup %s, %d ports already used. Create another ProxyGroup or open an issue if you believe this is unexpected.", proxyGroupName, maxPorts)
0 commit comments