From 19fb0da059ef4357a7100759ef23257cb38b6e44 Mon Sep 17 00:00:00 2001 From: Yanqiang Miao Date: Fri, 5 Jan 2018 17:07:51 +0800 Subject: [PATCH] Make sure is not nil Signed-off-by: Yanqiang Miao --- test/e2e_node/cpu_manager_test.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/test/e2e_node/cpu_manager_test.go b/test/e2e_node/cpu_manager_test.go index 7054933aaae..4186d78cb48 100644 --- a/test/e2e_node/cpu_manager_test.go +++ b/test/e2e_node/cpu_manager_test.go @@ -143,6 +143,9 @@ func enableCPUManagerInKubelet(f *framework.Framework) (oldCfg *kubeletconfig.Ku oldCfg, err := getCurrentKubeletConfig() framework.ExpectNoError(err) newCfg := oldCfg.DeepCopy() + if newCfg.FeatureGates == nil { + newCfg.FeatureGates = make(map[string]bool) + } // Enable CPU Manager using feature gate. newCfg.FeatureGates[string(features.CPUManager)] = true