Skip to content

Commit 0d3b859

Browse files
authored
Merge pull request kubernetes#125871 from dims/fix-for-merged-kubelet-config-does-not-match-the-expected-configuration-in-cgroupv1-based-jobs
Fix for Merged kubelet config does not match the expected configuration in cgroupv1 based jobs
2 parents 0cc5725 + 2dccf29 commit 0d3b859

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

test/e2e_node/kubelet_config_dir_test.go

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,13 @@ featureGates:
169169
},
170170
}
171171
// This covers the case where the fields within the map are overridden.
172-
initialConfig.FeatureGates = map[string]bool{"DisableKubeletCloudCredentialProviders": true, "PodAndContainerStatsFromCRI": false, "DynamicResourceAllocation": true}
172+
overrides := map[string]bool{"DisableKubeletCloudCredentialProviders": true, "PodAndContainerStatsFromCRI": false, "DynamicResourceAllocation": true}
173+
// In some CI jobs, `NodeSwap` is explicitly disabled as the images are cgroupv1 based,
174+
// so such flags should be picked up directly from the initial configuration
175+
if _, ok := initialConfig.FeatureGates["NodeSwap"]; ok {
176+
overrides["NodeSwap"] = initialConfig.FeatureGates["NodeSwap"]
177+
}
178+
initialConfig.FeatureGates = overrides
173179
// Compare the expected config with the merged config
174180
gomega.Expect(initialConfig).To(gomega.BeComparableTo(mergedConfig), "Merged kubelet config does not match the expected configuration.")
175181
})

0 commit comments

Comments
 (0)