Skip to content

Commit

Permalink
Fix agent supervisor port using apiserver port instead
Browse files Browse the repository at this point in the history
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
  • Loading branch information
brandond committed Jun 13, 2024
1 parent 9af17d2 commit b4d4ed8
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions pkg/agent/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -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(),
}
Expand Down
2 changes: 1 addition & 1 deletion pkg/agent/https/https.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions pkg/daemons/config/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ type Node struct {
Token string
Certificate *tls.Certificate
ServerHTTPSPort int
SupervisorPort int
DefaultRuntime string
}

Expand Down

0 comments on commit b4d4ed8

Please sign in to comment.