From ce7b9ed7085e2f45630621b65dea976b1565e93b Mon Sep 17 00:00:00 2001 From: chenk008 Date: Wed, 15 Nov 2023 07:54:32 +0800 Subject: [PATCH] add agent flag disable-apiserver-lb (#8717) * add node flag disable-agent-lb * add agent flag disable-apiserver-lb Co-authored-by: Brad Davidson Signed-off-by: chenk008 (cherry picked from commit b47cbbfd42d0b339abebda70a4cee2ce91ea66ca) Signed-off-by: Brad Davidson --- pkg/cli/cmds/agent.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/pkg/cli/cmds/agent.go b/pkg/cli/cmds/agent.go index cf83bdf97f..1080240d97 100644 --- a/pkg/cli/cmds/agent.go +++ b/pkg/cli/cmds/agent.go @@ -222,6 +222,11 @@ var ( Usage: "(deprecated) use --flannel-backend=none", Destination: &AgentConfig.NoFlannel, } + DisableAgentLBFlag = &cli.BoolFlag{ + Name: "disable-apiserver-lb", + Usage: "(agent/networking) (experimental) Disable the agent's client-side load-balancer and connect directly to the configured server address", + Destination: &AgentConfig.DisableLoadBalancer, + } ) func CheckSELinuxFlags(ctx *cli.Context) error { @@ -310,6 +315,7 @@ func NewAgentCommand(action func(ctx *cli.Context) error) cli.Command { }, VPNAuth, VPNAuthFile, + DisableAgentLBFlag, }, } }