diff --git a/test/e2e_node/podresources_test.go b/test/e2e_node/podresources_test.go index e72ead5df49..7bb3b8bbb12 100644 --- a/test/e2e_node/podresources_test.go +++ b/test/e2e_node/podresources_test.go @@ -664,11 +664,7 @@ func configurePodResourcesInKubelet(f *framework.Framework, cleanStateFile bool, oldCfg, err := getCurrentKubeletConfig() framework.ExpectNoError(err) newCfg := oldCfg.DeepCopy() - if newCfg.FeatureGates == nil { - newCfg.FeatureGates = make(map[string]bool) - } - newCfg.FeatureGates["CPUManager"] = true - newCfg.FeatureGates["KubeletPodResourcesGetAllocatable"] = true + newCfg.FeatureGates[string(kubefeatures.KubeletPodResourcesGetAllocatable)] = true // After graduation of the CPU Manager feature to Beta, the CPU Manager // "none" policy is ON by default. But when we set the CPU Manager policy to