Fix flag formatting errors in the node tests

There were three problems:
- Lack of a trailing space after prepending flags.
- Passing multiple flags in a string to --kubelet-flags seems to confuse
the flag parser; it stops parsing ALL flags as soon as it sees the
second kubelet flag. Fortunately, all instances of --kubelet-flags are
combined together, so we can just pass two of those.
- --feature-gates should be passed to the test framework, which then
forwards it to the kubelet, instead of using --kubelet-flags.

This hopefully fixes the dynamic config test failures on COS, which
started after #45602.
This commit is contained in:
Michael Taufen
2017-05-11 11:28:46 -07:00
parent 48caf95a6c
commit abb5c3fd5a
2 changed files with 3 additions and 2 deletions

View File

@@ -145,7 +145,8 @@ func updateCOSKubeletFlags(args, host, workspace string) (string, error) {
return args, fmt.Errorf("unabled to chmod 544 GCI/COS mounter script. Err: %v, Output:\n%s", err, output)
}
// Insert args at beginning of test args, so any values from command line take precedence
args = fmt.Sprintf("--kubelet-flags='--experimental-kernel-memcg-notification=true --experimental-mounter-path=%s'", mounterPath) + args
args = "--kubelet-flags=--experimental-kernel-memcg-notification=true " + args
args = fmt.Sprintf("--kubelet-flags=--experimental-mounter-path=%s ", mounterPath) + args
return args, nil
}