podresource-api: getAllocatableResources to Beta

Signed-off-by: Swati Sehgal <swsehgal@redhat.com>
This commit is contained in:
Swati Sehgal 2021-09-14 12:11:31 +01:00
parent 95391adbc0
commit 01dacd0463
3 changed files with 7 additions and 12 deletions

View File

@ -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},

View File

@ -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,

View File

@ -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))