Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

podresource-api: getAllocatableResources to Beta #105003

Merged
merged 1 commit into from
Oct 14, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 2 additions & 2 deletions pkg/features/kube_features.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand Down Expand Up @@ -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},
Expand Down
14 changes: 5 additions & 9 deletions test/e2e_node/memory_manager_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand All @@ -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
Expand Down Expand Up @@ -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,
Expand Down
1 change: 0 additions & 1 deletion test/e2e_node/podresources_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down