mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-17 15:50:10 +00:00
Merge pull request #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
This commit is contained in:
commit
0d3b859af8
@ -169,7 +169,13 @@ featureGates:
|
|||||||
},
|
},
|
||||||
}
|
}
|
||||||
// This covers the case where the fields within the map are overridden.
|
// This covers the case where the fields within the map are overridden.
|
||||||
initialConfig.FeatureGates = map[string]bool{"DisableKubeletCloudCredentialProviders": true, "PodAndContainerStatsFromCRI": false, "DynamicResourceAllocation": true}
|
overrides := map[string]bool{"DisableKubeletCloudCredentialProviders": true, "PodAndContainerStatsFromCRI": false, "DynamicResourceAllocation": true}
|
||||||
|
// In some CI jobs, `NodeSwap` is explicitly disabled as the images are cgroupv1 based,
|
||||||
|
// so such flags should be picked up directly from the initial configuration
|
||||||
|
if _, ok := initialConfig.FeatureGates["NodeSwap"]; ok {
|
||||||
|
overrides["NodeSwap"] = initialConfig.FeatureGates["NodeSwap"]
|
||||||
|
}
|
||||||
|
initialConfig.FeatureGates = overrides
|
||||||
// Compare the expected config with the merged config
|
// Compare the expected config with the merged config
|
||||||
gomega.Expect(initialConfig).To(gomega.BeComparableTo(mergedConfig), "Merged kubelet config does not match the expected configuration.")
|
gomega.Expect(initialConfig).To(gomega.BeComparableTo(mergedConfig), "Merged kubelet config does not match the expected configuration.")
|
||||||
})
|
})
|
||||||
|
Loading…
Reference in New Issue
Block a user