missed registering kubelet-config-file for the command line use case running test-e2e-node target

Signed-off-by: Davanum Srinivas <davanum@gmail.com>
This commit is contained in:
Davanum Srinivas 2023-03-14 15:46:31 -04:00
parent a1d157bf32
commit ee294de56d
No known key found for this signature in database
GPG Key ID: 80D83A796103BF59

View File

@ -63,9 +63,13 @@ func (a *args) Set(value string) error {
// kubeletArgs is the override kubelet args specified by the test runner.
var kubeletArgs args
var kubeletConfigFile = "./kubeletconfig.yaml"
func init() {
flag.Var(&kubeletArgs, "kubelet-flags", "Kubelet flags passed to kubelet, this will override default kubelet flags in the test. Flags specified in multiple kubelet-flags will be concatenate. Deprecated, see: --kubelet-config-file.")
if flag.Lookup("kubelet-config-file") == nil {
flag.StringVar(&kubeletConfigFile, "kubelet-config-file", kubeletConfigFile, "The base KubeletConfiguration to use when setting up the kubelet. This configuration will then be minimially modified to support requirements from the test suite.")
}
}
// RunKubelet starts kubelet and waits for termination signal. Once receives the
@ -174,7 +178,6 @@ func (e *E2EServices) startKubelet(featureGates map[string]bool) (*server, error
return nil, err
}
kubeletConfigFile := "./kubeletconfig.yaml"
lookup := flag.Lookup("kubelet-config-file")
if lookup != nil {
kubeletConfigFile = lookup.Value.String()