mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-24 20:24:09 +00:00
Merge pull request #105003 from swatisehgal/getallocatable-to-beta
podresource-api: getAllocatableResources to Beta
This commit is contained in:
commit
894ceb63d0
@ -642,7 +642,7 @@ const (
|
|||||||
|
|
||||||
// owner: @fromanirh
|
// owner: @fromanirh
|
||||||
// alpha: v1.21
|
// alpha: v1.21
|
||||||
//
|
// beta: v1.23
|
||||||
// Enable POD resources API to return allocatable resources
|
// Enable POD resources API to return allocatable resources
|
||||||
KubeletPodResourcesGetAllocatable featuregate.Feature = "KubeletPodResourcesGetAllocatable"
|
KubeletPodResourcesGetAllocatable featuregate.Feature = "KubeletPodResourcesGetAllocatable"
|
||||||
|
|
||||||
@ -852,7 +852,7 @@ var defaultKubernetesFeatureGates = map[featuregate.Feature]featuregate.FeatureS
|
|||||||
ServiceInternalTrafficPolicy: {Default: true, PreRelease: featuregate.Beta},
|
ServiceInternalTrafficPolicy: {Default: true, PreRelease: featuregate.Beta},
|
||||||
LogarithmicScaleDown: {Default: true, PreRelease: featuregate.Beta},
|
LogarithmicScaleDown: {Default: true, PreRelease: featuregate.Beta},
|
||||||
SuspendJob: {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
|
NamespaceDefaultLabelName: {Default: true, PreRelease: featuregate.GA, LockToDefault: true}, // remove in 1.24
|
||||||
CSIVolumeHealth: {Default: false, PreRelease: featuregate.Alpha},
|
CSIVolumeHealth: {Default: false, PreRelease: featuregate.Alpha},
|
||||||
WindowsHostProcessContainers: {Default: false, PreRelease: featuregate.Alpha},
|
WindowsHostProcessContainers: {Default: false, PreRelease: featuregate.Alpha},
|
||||||
|
@ -176,7 +176,6 @@ func getAllocatableMemoryFromStateFile(s *state.MemoryManagerCheckpoint) []state
|
|||||||
}
|
}
|
||||||
|
|
||||||
type kubeletParams struct {
|
type kubeletParams struct {
|
||||||
podResourcesGetAllocatableFeatureGate bool
|
|
||||||
memoryManagerPolicy string
|
memoryManagerPolicy string
|
||||||
systemReservedMemory []kubeletconfig.MemoryReservation
|
systemReservedMemory []kubeletconfig.MemoryReservation
|
||||||
systemReserved map[string]string
|
systemReserved map[string]string
|
||||||
@ -191,8 +190,6 @@ func getUpdatedKubeletConfig(oldCfg *kubeletconfig.KubeletConfiguration, params
|
|||||||
newCfg.FeatureGates = map[string]bool{}
|
newCfg.FeatureGates = map[string]bool{}
|
||||||
}
|
}
|
||||||
|
|
||||||
newCfg.FeatureGates["KubeletPodResourcesGetAllocatable"] = params.podResourcesGetAllocatableFeatureGate
|
|
||||||
|
|
||||||
newCfg.MemoryManagerPolicy = params.memoryManagerPolicy
|
newCfg.MemoryManagerPolicy = params.memoryManagerPolicy
|
||||||
|
|
||||||
// update system-reserved
|
// update system-reserved
|
||||||
@ -283,7 +280,6 @@ var _ = SIGDescribe("Memory Manager [Serial] [Feature:MemoryManager]", func() {
|
|||||||
|
|
||||||
memoryQuantity := resource.MustParse("1100Mi")
|
memoryQuantity := resource.MustParse("1100Mi")
|
||||||
defaultKubeParams := &kubeletParams{
|
defaultKubeParams := &kubeletParams{
|
||||||
podResourcesGetAllocatableFeatureGate: true,
|
|
||||||
systemReservedMemory: []kubeletconfig.MemoryReservation{
|
systemReservedMemory: []kubeletconfig.MemoryReservation{
|
||||||
{
|
{
|
||||||
NumaNode: 0,
|
NumaNode: 0,
|
||||||
|
@ -854,7 +854,6 @@ func enablePodResourcesFeatureGateInKubelet(f *framework.Framework) (oldCfg *kub
|
|||||||
if newCfg.FeatureGates == nil {
|
if newCfg.FeatureGates == nil {
|
||||||
newCfg.FeatureGates = make(map[string]bool)
|
newCfg.FeatureGates = make(map[string]bool)
|
||||||
}
|
}
|
||||||
newCfg.FeatureGates["KubeletPodResourcesGetAllocatable"] = true
|
|
||||||
|
|
||||||
// Update the Kubelet configuration.
|
// Update the Kubelet configuration.
|
||||||
framework.ExpectNoError(setKubeletConfiguration(f, newCfg))
|
framework.ExpectNoError(setKubeletConfiguration(f, newCfg))
|
||||||
|
Loading…
Reference in New Issue
Block a user