Merge pull request #133720 from carlory/cleanup-SizeMemoryBackedVolumes

Drop SizeMemoryBackedVolumes after the feature GA-ed in 1.32
This commit is contained in:
Kubernetes Prow Robot
2025-09-02 15:33:13 -07:00
committed by GitHub
4 changed files with 2 additions and 35 deletions

View File

@@ -923,13 +923,6 @@ const (
// pod's lifecycle and will not block pod termination.
SidecarContainers featuregate.Feature = "SidecarContainers"
// owner: @derekwaynecarr
//
// Enables kubelet support to size memory backed volumes
// This is a kubelet only feature gate.
// Code can be removed in 1.35 without any consideration for emulated versions.
SizeMemoryBackedVolumes featuregate.Feature = "SizeMemoryBackedVolumes"
// owner: @cupnes
// kep: https://kep.k8s.io/4049
//
@@ -1728,12 +1721,6 @@ var defaultVersionedKubernetesFeatureGates = map[featuregate.Feature]featuregate
{Version: version.MustParse("1.33"), Default: true, LockToDefault: true, PreRelease: featuregate.GA}, // GA in 1.33 remove in 1.36
},
SizeMemoryBackedVolumes: {
{Version: version.MustParse("1.20"), Default: false, PreRelease: featuregate.Alpha},
{Version: version.MustParse("1.22"), Default: true, PreRelease: featuregate.Beta},
{Version: version.MustParse("1.32"), Default: true, LockToDefault: true, PreRelease: featuregate.GA},
},
StorageCapacityScoring: {
{Version: version.MustParse("1.33"), Default: false, PreRelease: featuregate.Alpha},
},

View File

@@ -112,14 +112,8 @@ func (plugin *emptyDirPlugin) NewMounter(spec *volume.Spec, pod *v1.Pod) (volume
}
func calculateEmptyDirMemorySize(nodeAllocatableMemory *resource.Quantity, spec *volume.Spec, pod *v1.Pod) *resource.Quantity {
// if feature is disabled, continue the default behavior of linux host default
sizeLimit := &resource.Quantity{}
if !utilfeature.DefaultFeatureGate.Enabled(features.SizeMemoryBackedVolumes) {
return sizeLimit
}
// size limit defaults to node allocatable (pods can't consume more memory than all pods)
sizeLimit = nodeAllocatableMemory
sizeLimit := nodeAllocatableMemory
zero := resource.MustParse("0")
// determine pod resource allocation

View File

@@ -1585,20 +1585,6 @@
lockToDefault: false
preRelease: Beta
version: "1.34"
- name: SizeMemoryBackedVolumes
versionedSpecs:
- default: false
lockToDefault: false
preRelease: Alpha
version: "1.20"
- default: true
lockToDefault: false
preRelease: Beta
version: "1.22"
- default: true
lockToDefault: true
preRelease: GA
version: "1.32"
- name: StorageCapacityScoring
versionedSpecs:
- default: false

View File

@@ -368,7 +368,7 @@ var _ = SIGDescribe("LocalStorageCapacityIsolationEviction", framework.WithSlow(
v1.ResourceRequirements{Limits: containerLimit}),
},
{
evictionPriority: 0, // This pod should not be evicted because MemoryBackedVolumes cannot use more space than is allocated to them since SizeMemoryBackedVolumes was enabled
evictionPriority: 0, // This pod should not be evicted because MemoryBackedVolumes cannot use more space than is allocated to them
pod: diskConsumingPod("emptydir-memory-sizelimit", useOverLimit, &v1.VolumeSource{
EmptyDir: &v1.EmptyDirVolumeSource{Medium: "Memory", SizeLimit: &sizeLimit},
}, v1.ResourceRequirements{}),