Merge pull request #116611 from dims/missed-registering-kubelet-config-file-for-make-test-e2e-node-usecase

missed registering kubelet-config-file for the command line use case running test-e2e-node target
This commit is contained in:
Kubernetes Prow Robot 2023-03-14 19:27:21 -07:00 committed by GitHub
commit 602ba9a714
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -63,9 +63,13 @@ func (a *args) Set(value string) error {
// kubeletArgs is the override kubelet args specified by the test runner. // kubeletArgs is the override kubelet args specified by the test runner.
var kubeletArgs args var kubeletArgs args
var kubeletConfigFile = "./kubeletconfig.yaml"
func init() { 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.") 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 // RunKubelet starts kubelet and waits for termination signal. Once receives the
@ -181,7 +185,6 @@ func (e *E2EServices) startKubelet(featureGates map[string]bool) (*server, error
return nil, err return nil, err
} }
kubeletConfigFile := "./kubeletconfig.yaml"
lookup := flag.Lookup("kubelet-config-file") lookup := flag.Lookup("kubelet-config-file")
if lookup != nil { if lookup != nil {
kubeletConfigFile = lookup.Value.String() kubeletConfigFile = lookup.Value.String()