Commit 19fb0da0 authored by Yanqiang Miao's avatar Yanqiang Miao

Make sure is not nil

parent 41188180
...@@ -143,6 +143,9 @@ func enableCPUManagerInKubelet(f *framework.Framework) (oldCfg *kubeletconfig.Ku ...@@ -143,6 +143,9 @@ func enableCPUManagerInKubelet(f *framework.Framework) (oldCfg *kubeletconfig.Ku
oldCfg, err := getCurrentKubeletConfig() oldCfg, err := getCurrentKubeletConfig()
framework.ExpectNoError(err) framework.ExpectNoError(err)
newCfg := oldCfg.DeepCopy() newCfg := oldCfg.DeepCopy()
if newCfg.FeatureGates == nil {
newCfg.FeatureGates = make(map[string]bool)
}
// Enable CPU Manager using feature gate. // Enable CPU Manager using feature gate.
newCfg.FeatureGates[string(features.CPUManager)] = true newCfg.FeatureGates[string(features.CPUManager)] = true
......
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