Unverified Commit 452b8c9e authored by Kubernetes Submit Queue's avatar Kubernetes Submit Queue Committed by GitHub

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 ```
parents 15cc2063 7e3d28b3
......@@ -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()))
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment