add agent flag disable-apiserver-lb (#8717)

* add node flag disable-agent-lb
* add agent flag disable-apiserver-lb

Co-authored-by: Brad Davidson <brad@oatmail.org>
Signed-off-by: chenk008 <kongchen28@gmail.com>
(cherry picked from commit b47cbbfd42)
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
pull/8889/head
chenk008 2023-11-15 07:54:32 +08:00 committed by Brad Davidson
parent 564d3c8378
commit ce7b9ed708
1 changed files with 6 additions and 0 deletions

View File

@ -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,
},
}
}