mirror of
https://github.com/k3s-io/k3s.git
synced 2024-06-07 19:41:36 +00:00
Merge pull request #2044 from briandowns/add_cis_server_flag
update cis flag implementation to propogate the rest of the way
This commit is contained in:
commit
04f57e5e1d
@ -485,6 +485,7 @@ func get(envInfo *cmds.Agent, proxy proxy.Proxy) (*config.Node, error) {
|
||||
nodeConfig.AgentConfig.Rootless = envInfo.Rootless
|
||||
nodeConfig.AgentConfig.PodManifests = filepath.Join(envInfo.DataDir, DefaultPodManifestPath)
|
||||
nodeConfig.DisableSELinux = envInfo.DisableSELinux
|
||||
nodeConfig.AgentConfig.ProtectKernelDefaults = envInfo.ProtectKernelDefaults
|
||||
|
||||
return nodeConfig, nil
|
||||
}
|
||||
|
@ -56,7 +56,6 @@ 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())
|
||||
|
||||
|
@ -247,6 +247,7 @@ func NewServerCommand(action func(*cli.Context) error) *cli.Command {
|
||||
&FlannelConfFlag,
|
||||
&ExtraKubeletArgs,
|
||||
&ExtraKubeProxyArgs,
|
||||
&ProtectKernelDefaultsFlag,
|
||||
&cli.BoolFlag{
|
||||
Name: "rootless",
|
||||
Usage: "(experimental) Run rootless",
|
||||
|
@ -155,6 +155,10 @@ func startKubelet(cfg *config.Agent) error {
|
||||
argsMap["enforce-node-allocatable"] = ""
|
||||
}
|
||||
|
||||
if cfg.ProtectKernelDefaults {
|
||||
argsMap["protect-kernel-defaults"] = "true"
|
||||
}
|
||||
|
||||
args := config.GetArgsList(argsMap, cfg.ExtraKubeletArgs)
|
||||
logrus.Infof("Running kubelet %s", config.ArgString(args))
|
||||
|
||||
|
@ -83,6 +83,7 @@ type Agent struct {
|
||||
DisableNPC bool
|
||||
DisableKubeProxy bool
|
||||
Rootless bool
|
||||
ProtectKernelDefaults bool
|
||||
}
|
||||
|
||||
type Control struct {
|
||||
|
Loading…
Reference in New Issue
Block a user