mirror of https://github.com/k3s-io/k3s
Merge pull request #62101 from bart0sh/PR0010-e2e_node-kubelet-command-line-fix
Automatic merge from submit-queue (batch tested with PRs 58474, 60034, 62101, 63198). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>. Fix wrong usage of kubelet option **What this PR does / why we need it**: "--allow-privileged true" is incorrect usage of boolean option. It means setting '--allow-priviledged' to its default value plus non-existing subcommand 'true'. "--allow-privileged false" is even more confusing as it sets allow-priviledged flag to its default value 'true' This is true for any boolean command line option. Fixed this by using correct syntax --allow-priviledged=true **Special notes for your reviewer**: This is a show-stopper for PR #61833 **Release note**: ```release-note NONE ```pull/8/head
commit
452b8c9e0d
|
@ -257,7 +257,7 @@ func (e *E2EServices) startKubelet() (*server, error) {
|
|||
"--kubeconfig", kubeconfigPath,
|
||||
"--root-dir", KubeletRootDirectory,
|
||||
"--v", LOG_VERBOSITY_LEVEL, "--logtostderr",
|
||||
"--allow-privileged", "true",
|
||||
"--allow-privileged=true",
|
||||
)
|
||||
|
||||
// Apply test framework feature gates by default. This could also be overridden
|
||||
|
@ -347,7 +347,7 @@ func addKubeletConfigFlags(cmdArgs *[]string, kc *kubeletconfig.KubeletConfigura
|
|||
fs := pflag.NewFlagSet("kubelet", pflag.ExitOnError)
|
||||
options.AddKubeletConfigFlags(fs, kc)
|
||||
for _, name := range flags {
|
||||
*cmdArgs = append(*cmdArgs, "--"+name, fs.Lookup(name).Value.String())
|
||||
*cmdArgs = append(*cmdArgs, fmt.Sprintf("--%s=%s", name, fs.Lookup(name).Value.String()))
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue