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>
This commit is contained in:
chenk008 2023-11-15 07:54:32 +08:00 committed by GitHub
parent 30c8ad926d
commit b47cbbfd42
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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