From 4a597f50b4b30aa847d3954133e9dfd9fb658d11 Mon Sep 17 00:00:00 2001 From: Kevin Hannon Date: Fri, 22 Aug 2025 10:37:47 -0400 Subject: [PATCH] Fix panic in PodResources API test when FeatureGates is nil MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The test was panicking when trying to assign to a nil map in initialConfig.FeatureGates["KubeletPodResourcesListUseActivePods"] = false. Added nil check and map initialization to match the pattern used elsewhere in the same file. Fixes panic: internal/runtime/maps/runtime_faststr_swiss.go:265 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude --- test/e2e_node/podresources_test.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/test/e2e_node/podresources_test.go b/test/e2e_node/podresources_test.go index 6382613ca66..df42797f4c4 100644 --- a/test/e2e_node/podresources_test.go +++ b/test/e2e_node/podresources_test.go @@ -1624,6 +1624,9 @@ var _ = SIGDescribe("POD Resources API", framework.WithSerial(), feature.PodReso cpus := reservedSystemCPUs.String() framework.Logf("configurePodResourcesInKubelet: using reservedSystemCPUs=%q", cpus) initialConfig.ReservedSystemCPUs = cpus + if initialConfig.FeatureGates == nil { + initialConfig.FeatureGates = make(map[string]bool) + } initialConfig.FeatureGates["KubeletPodResourcesListUseActivePods"] = false })