add protect-kernel-defaults to kubelet

Signed-off-by: Brian Downs <brian.downs@gmail.com>
pull/2023/head
Brian Downs 4 years ago
parent 66a8c2ad7f
commit 57a6319fac

@ -56,6 +56,7 @@ func Run(ctx *cli.Context) error {
cfg := cmds.AgentConfig
cfg.Debug = ctx.Bool("debug")
cfg.DataDir = dataDir
cfg.ProtectKernelDefaults = true
contextCtx := signals.SetupSignalHandler(context.Background())

@ -36,6 +36,7 @@ type Agent struct {
Labels []string
Taints []string
PrivateRegistry string
ProtectKernelDefaults bool
AgentShared
}
@ -136,6 +137,11 @@ var (
Hidden: true,
Destination: &AgentConfig.DisableSELinux,
}
ProtectKernelDefaultsFlag = cli.BoolFlag{
Name: "protect-kernel-defaults",
Usage: "(agent/node) ",
Destination: &AgentConfig.ProtectKernelDefaults,
}
)
func NewAgentCommand(action func(ctx *cli.Context) error) *cli.Command {
@ -192,6 +198,7 @@ func NewAgentCommand(action func(ctx *cli.Context) error) *cli.Command {
&FlannelConfFlag,
&ExtraKubeletArgs,
&ExtraKubeProxyArgs,
&ProtectKernelDefaultsFlag,
&cli.BoolFlag{
Name: "rootless",
Usage: "(experimental) Run rootless",

Loading…
Cancel
Save