From b4d4ed8f010a2f95035652bb03565d16a4ddb87f Mon Sep 17 00:00:00 2001 From: Brad Davidson Date: Thu, 13 Jun 2024 20:27:33 +0000 Subject: [PATCH] Fix agent supervisor port using apiserver port instead Signed-off-by: Brad Davidson --- pkg/agent/config/config.go | 1 + pkg/agent/https/https.go | 2 +- pkg/daemons/config/types.go | 1 + 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/pkg/agent/config/config.go b/pkg/agent/config/config.go index 7366a99241..b7e2cfc67b 100644 --- a/pkg/agent/config/config.go +++ b/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(), } diff --git a/pkg/agent/https/https.go b/pkg/agent/https/https.go index da453742b8..87dc8517e5 100644 --- a/pkg/agent/https/https.go +++ b/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 diff --git a/pkg/daemons/config/types.go b/pkg/daemons/config/types.go index e65ac7fde2..33db100222 100644 --- a/pkg/daemons/config/types.go +++ b/pkg/daemons/config/types.go @@ -58,6 +58,7 @@ type Node struct { Token string Certificate *tls.Certificate ServerHTTPSPort int + SupervisorPort int DefaultRuntime string }