From 01dacd046363d0af861a6328d91cbcc49370c976 Mon Sep 17 00:00:00 2001 From: Swati Sehgal Date: Tue, 14 Sep 2021 12:11:31 +0100 Subject: [PATCH] podresource-api: getAllocatableResources to Beta Signed-off-by: Swati Sehgal --- pkg/features/kube_features.go | 4 ++-- test/e2e_node/memory_manager_test.go | 14 +++++--------- test/e2e_node/podresources_test.go | 1 - 3 files changed, 7 insertions(+), 12 deletions(-) diff --git a/pkg/features/kube_features.go b/pkg/features/kube_features.go index 6792b7864dd..4134788ba33 100644 --- a/pkg/features/kube_features.go +++ b/pkg/features/kube_features.go @@ -683,7 +683,7 @@ const ( // owner: @fromanirh // alpha: v1.21 - // + // beta: v1.23 // Enable POD resources API to return allocatable resources KubeletPodResourcesGetAllocatable featuregate.Feature = "KubeletPodResourcesGetAllocatable" @@ -870,7 +870,7 @@ var defaultKubernetesFeatureGates = map[featuregate.Feature]featuregate.FeatureS ServiceInternalTrafficPolicy: {Default: true, PreRelease: featuregate.Beta}, LogarithmicScaleDown: {Default: true, PreRelease: featuregate.Beta}, SuspendJob: {Default: true, PreRelease: featuregate.Beta}, - KubeletPodResourcesGetAllocatable: {Default: false, PreRelease: featuregate.Alpha}, + KubeletPodResourcesGetAllocatable: {Default: true, PreRelease: featuregate.Beta}, NamespaceDefaultLabelName: {Default: true, PreRelease: featuregate.GA, LockToDefault: true}, // remove in 1.24 CSIVolumeHealth: {Default: false, PreRelease: featuregate.Alpha}, WindowsHostProcessContainers: {Default: false, PreRelease: featuregate.Alpha}, diff --git a/test/e2e_node/memory_manager_test.go b/test/e2e_node/memory_manager_test.go index eee9674de48..4784f9f53cf 100644 --- a/test/e2e_node/memory_manager_test.go +++ b/test/e2e_node/memory_manager_test.go @@ -176,12 +176,11 @@ func getAllocatableMemoryFromStateFile(s *state.MemoryManagerCheckpoint) []state } type kubeletParams struct { - podResourcesGetAllocatableFeatureGate bool - memoryManagerPolicy string - systemReservedMemory []kubeletconfig.MemoryReservation - systemReserved map[string]string - kubeReserved map[string]string - evictionHard map[string]string + memoryManagerPolicy string + systemReservedMemory []kubeletconfig.MemoryReservation + systemReserved map[string]string + kubeReserved map[string]string + evictionHard map[string]string } func getUpdatedKubeletConfig(oldCfg *kubeletconfig.KubeletConfiguration, params *kubeletParams) *kubeletconfig.KubeletConfiguration { @@ -191,8 +190,6 @@ func getUpdatedKubeletConfig(oldCfg *kubeletconfig.KubeletConfiguration, params newCfg.FeatureGates = map[string]bool{} } - newCfg.FeatureGates["KubeletPodResourcesGetAllocatable"] = params.podResourcesGetAllocatableFeatureGate - newCfg.MemoryManagerPolicy = params.memoryManagerPolicy // update system-reserved @@ -283,7 +280,6 @@ var _ = SIGDescribe("Memory Manager [Serial] [Feature:MemoryManager]", func() { memoryQuantity := resource.MustParse("1100Mi") defaultKubeParams := &kubeletParams{ - podResourcesGetAllocatableFeatureGate: true, systemReservedMemory: []kubeletconfig.MemoryReservation{ { NumaNode: 0, diff --git a/test/e2e_node/podresources_test.go b/test/e2e_node/podresources_test.go index e72ead5df49..690ced5ba65 100644 --- a/test/e2e_node/podresources_test.go +++ b/test/e2e_node/podresources_test.go @@ -725,7 +725,6 @@ func enablePodResourcesFeatureGateInKubelet(f *framework.Framework) (oldCfg *kub if newCfg.FeatureGates == nil { newCfg.FeatureGates = make(map[string]bool) } - newCfg.FeatureGates["KubeletPodResourcesGetAllocatable"] = true // Update the Kubelet configuration. framework.ExpectNoError(setKubeletConfiguration(f, newCfg))