From 76a526850d714f39b84b231410894567f237143e 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 34f705213e44..284df590fdc8 100644 --- a/pkg/agent/config/config.go +++ b/pkg/agent/config/config.go @@ -546,6 +546,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 da453742b8a7..87dc8517e5c6 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 a2d8905e97bd..bb0a4683708e 100644 --- a/pkg/daemons/config/types.go +++ b/pkg/daemons/config/types.go @@ -59,6 +59,7 @@ type Node struct { Token string Certificate *tls.Certificate ServerHTTPSPort int + SupervisorPort int DefaultRuntime string }