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/8887/head
chenk008 2023-11-15 07:54:32 +08:00 committed by Brad Davidson
parent d7c1ac7ab6
commit df7b982107
1 changed files with 6 additions and 0 deletions

View File

@ -209,6 +209,11 @@ var (
Destination: &AgentConfig.ImageCredProvConfig,
Value: "/var/lib/rancher/credentialprovider/config.yaml",
}
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 NewAgentCommand(action func(ctx *cli.Context) error) cli.Command {
@ -277,6 +282,7 @@ func NewAgentCommand(action func(ctx *cli.Context) error) cli.Command {
DockerFlag,
VPNAuth,
VPNAuthFile,
DisableAgentLBFlag,
},
}
}