mirror of https://github.com/k3s-io/k3s
Fix agent supervisor port using apiserver port instead
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>pull/10378/head v1.27.15-rc2+k3s1
parent
102e42a55d
commit
cb36c910a6
|
@ -546,6 +546,7 @@ func get(ctx context.Context, envInfo *cmds.Agent, proxy proxy.Proxy) (*config.N
|
||||||
FlannelExternalIP: controlConfig.FlannelExternalIP,
|
FlannelExternalIP: controlConfig.FlannelExternalIP,
|
||||||
EgressSelectorMode: controlConfig.EgressSelectorMode,
|
EgressSelectorMode: controlConfig.EgressSelectorMode,
|
||||||
ServerHTTPSPort: controlConfig.HTTPSPort,
|
ServerHTTPSPort: controlConfig.HTTPSPort,
|
||||||
|
SupervisorPort: controlConfig.SupervisorPort,
|
||||||
SupervisorMetrics: controlConfig.SupervisorMetrics,
|
SupervisorMetrics: controlConfig.SupervisorMetrics,
|
||||||
Token: info.String(),
|
Token: info.String(),
|
||||||
}
|
}
|
||||||
|
|
|
@ -36,7 +36,7 @@ func Start(ctx context.Context, nodeConfig *config.Node, runtime *config.Control
|
||||||
|
|
||||||
if runtime == nil {
|
if runtime == nil {
|
||||||
// If we do not have an existing handler, set up a new listener
|
// 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 {
|
if lerr != nil {
|
||||||
err = lerr
|
err = lerr
|
||||||
return
|
return
|
||||||
|
|
|
@ -60,6 +60,7 @@ type Node struct {
|
||||||
Token string
|
Token string
|
||||||
Certificate *tls.Certificate
|
Certificate *tls.Certificate
|
||||||
ServerHTTPSPort int
|
ServerHTTPSPort int
|
||||||
|
SupervisorPort int
|
||||||
DefaultRuntime string
|
DefaultRuntime string
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue