Browse Source

Fix agent supervisor port using apiserver port instead

Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
pull/10337/head v1.30.2-rc2+k3s1
Brad Davidson 5 months ago committed by Brad Davidson
parent
commit
b4d4ed8f01
  1. 1
      pkg/agent/config/config.go
  2. 2
      pkg/agent/https/https.go
  3. 1
      pkg/daemons/config/types.go

1
pkg/agent/config/config.go

@ -545,6 +545,7 @@ func get(ctx context.Context, envInfo *cmds.Agent, proxy proxy.Proxy) (*config.N
FlannelExternalIP: controlConfig.FlannelExternalIP,
EgressSelectorMode: controlConfig.EgressSelectorMode,
ServerHTTPSPort: controlConfig.HTTPSPort,
SupervisorPort: controlConfig.SupervisorPort,
SupervisorMetrics: controlConfig.SupervisorMetrics,
Token: info.String(),
}

2
pkg/agent/https/https.go

@ -36,7 +36,7 @@ func Start(ctx context.Context, nodeConfig *config.Node, runtime *config.Control
if runtime == nil {
// If we do not have an existing handler, set up a new listener
tcp, lerr := util.ListenWithLoopback(ctx, nodeConfig.AgentConfig.ListenAddress, strconv.Itoa(nodeConfig.ServerHTTPSPort))
tcp, lerr := util.ListenWithLoopback(ctx, nodeConfig.AgentConfig.ListenAddress, strconv.Itoa(nodeConfig.SupervisorPort))
if lerr != nil {
err = lerr
return

1
pkg/daemons/config/types.go

@ -58,6 +58,7 @@ type Node struct {
Token string
Certificate *tls.Certificate
ServerHTTPSPort int
SupervisorPort int
DefaultRuntime string
}

Loading…
Cancel
Save