From dfa449fabf3a5126f2d4d381d224a1339daf5cf1 Mon Sep 17 00:00:00 2001 From: Jefftree Date: Fri, 8 May 2026 11:23:22 -0400 Subject: [PATCH] Remove locked GA feature gate OrderedNamespaceDeletion --- .../deletion/namespaced_resources_deleter.go | 6 ++---- pkg/features/kube_features.go | 14 -------------- .../reference/feature_list.md | 1 - .../reference/versioned_feature_list.yaml | 14 -------------- 4 files changed, 2 insertions(+), 33 deletions(-) diff --git a/pkg/controller/namespace/deletion/namespaced_resources_deleter.go b/pkg/controller/namespace/deletion/namespaced_resources_deleter.go index f4ac1f5a612..50eda4e2a0d 100644 --- a/pkg/controller/namespace/deletion/namespaced_resources_deleter.go +++ b/pkg/controller/namespace/deletion/namespaced_resources_deleter.go @@ -32,11 +32,9 @@ import ( utilerrors "k8s.io/apimachinery/pkg/util/errors" utilruntime "k8s.io/apimachinery/pkg/util/runtime" "k8s.io/apimachinery/pkg/util/sets" - utilfeature "k8s.io/apiserver/pkg/util/feature" "k8s.io/client-go/discovery" v1clientset "k8s.io/client-go/kubernetes/typed/core/v1" "k8s.io/client-go/metadata" - "k8s.io/kubernetes/pkg/features" ) // NamespacedResourcesDeleterInterface is the interface to delete a namespace with all resources in it. @@ -530,7 +528,7 @@ func (d *namespacedResourcesDeleter) deleteAllContent(ctx context.Context, ns *v } podsGVR := schema.GroupVersionResource{Group: "", Version: "v1", Resource: "pods"} - if _, hasPods := groupVersionResources[podsGVR]; hasPods && utilfeature.DefaultFeatureGate.Enabled(features.OrderedNamespaceDeletion) { + if _, hasPods := groupVersionResources[podsGVR]; hasPods { // Ensure all pods in the namespace are deleted first gvrDeletionMetadata, err := d.deleteAllContentForGroupVersionResource(ctx, podsGVR, namespace, namespaceDeletedAt) if err != nil { @@ -564,7 +562,7 @@ func (d *namespacedResourcesDeleter) deleteAllContent(ctx context.Context, ns *v // Proceed with deleting other resources in the namespace for gvr := range groupVersionResources { - if utilfeature.DefaultFeatureGate.Enabled(features.OrderedNamespaceDeletion) && gvr.Group == podsGVR.Group && + if gvr.Group == podsGVR.Group && gvr.Version == podsGVR.Version && gvr.Resource == podsGVR.Resource { continue } diff --git a/pkg/features/kube_features.go b/pkg/features/kube_features.go index 85bec96e5c3..4eb86a1a0dd 100644 --- a/pkg/features/kube_features.go +++ b/pkg/features/kube_features.go @@ -712,12 +712,6 @@ const ( // Enables opportunistic batching in the scheduler. OpportunisticBatching featuregate.Feature = "OpportunisticBatching" - // owner: @cici37 - // kep: https://kep.k8s.io/5080 - // - // Enables ordered namespace deletion. - OrderedNamespaceDeletion featuregate.Feature = "OrderedNamespaceDeletion" - // owner: @tallclair // // Enables relisting individual pods on-demand. @@ -1713,12 +1707,6 @@ var defaultVersionedKubernetesFeatureGates = map[featuregate.Feature]featuregate {Version: version.MustParse("1.35"), Default: true, PreRelease: featuregate.Beta}, }, - OrderedNamespaceDeletion: { - {Version: version.MustParse("1.30"), Default: false, PreRelease: featuregate.Beta}, - {Version: version.MustParse("1.33"), Default: true, PreRelease: featuregate.Beta}, - {Version: version.MustParse("1.34"), Default: true, PreRelease: featuregate.GA, LockToDefault: true}, // remove in 1.37 - }, - PLEGOnDemandRelist: { {Version: version.MustParse("1.36"), Default: true, PreRelease: featuregate.Beta}, }, @@ -2524,8 +2512,6 @@ var defaultKubernetesFeatureGateDependencies = map[featuregate.Feature][]feature OpportunisticBatching: {}, - OrderedNamespaceDeletion: {}, - PLEGOnDemandRelist: {}, PersistentVolumeClaimUnusedSinceTime: {}, diff --git a/test/compatibility_lifecycle/reference/feature_list.md b/test/compatibility_lifecycle/reference/feature_list.md index acc72141af3..4ecc3420567 100644 --- a/test/compatibility_lifecycle/reference/feature_list.md +++ b/test/compatibility_lifecycle/reference/feature_list.md @@ -141,7 +141,6 @@ | NominatedNodeNameForExpectation | :ballot_box_with_check: 1.35+ | | 1.34 | 1.35– | | | | [code](https://cs.k8s.io/?q=%5CbNominatedNodeNameForExpectation%5Cb&i=nope&files=&excludeFiles=CHANGELOG&repos=kubernetes/kubernetes) [KEPs](https://cs.k8s.io/?q=%5CbNominatedNodeNameForExpectation%5Cb&i=nope&files=&excludeFiles=CHANGELOG&repos=kubernetes/enhancements) | | OpenAPIEnums | :ballot_box_with_check: 1.24+ | | 1.23 | 1.24– | | | | [code](https://cs.k8s.io/?q=%5CbOpenAPIEnums%5Cb&i=nope&files=&excludeFiles=CHANGELOG&repos=kubernetes/kubernetes) [KEPs](https://cs.k8s.io/?q=%5CbOpenAPIEnums%5Cb&i=nope&files=&excludeFiles=CHANGELOG&repos=kubernetes/enhancements) | | OpportunisticBatching | :ballot_box_with_check: 1.35+ | | | 1.35– | | | | [code](https://cs.k8s.io/?q=%5CbOpportunisticBatching%5Cb&i=nope&files=&excludeFiles=CHANGELOG&repos=kubernetes/kubernetes) [KEPs](https://cs.k8s.io/?q=%5CbOpportunisticBatching%5Cb&i=nope&files=&excludeFiles=CHANGELOG&repos=kubernetes/enhancements) | -| OrderedNamespaceDeletion | :ballot_box_with_check: 1.33+ | :closed_lock_with_key: 1.34+ | | 1.30–1.33 | 1.34– | | | [code](https://cs.k8s.io/?q=%5CbOrderedNamespaceDeletion%5Cb&i=nope&files=&excludeFiles=CHANGELOG&repos=kubernetes/kubernetes) [KEPs](https://cs.k8s.io/?q=%5CbOrderedNamespaceDeletion%5Cb&i=nope&files=&excludeFiles=CHANGELOG&repos=kubernetes/enhancements) | | PLEGOnDemandRelist | :ballot_box_with_check: 1.36+ | | | 1.36– | | | | [code](https://cs.k8s.io/?q=%5CbPLEGOnDemandRelist%5Cb&i=nope&files=&excludeFiles=CHANGELOG&repos=kubernetes/kubernetes) [KEPs](https://cs.k8s.io/?q=%5CbPLEGOnDemandRelist%5Cb&i=nope&files=&excludeFiles=CHANGELOG&repos=kubernetes/enhancements) | | PersistentVolumeClaimUnusedSinceTime | | | 1.36– | | | | | [code](https://cs.k8s.io/?q=%5CbPersistentVolumeClaimUnusedSinceTime%5Cb&i=nope&files=&excludeFiles=CHANGELOG&repos=kubernetes/kubernetes) [KEPs](https://cs.k8s.io/?q=%5CbPersistentVolumeClaimUnusedSinceTime%5Cb&i=nope&files=&excludeFiles=CHANGELOG&repos=kubernetes/enhancements) | | PodAndContainerStatsFromCRI | | | 1.23– | | | | | [code](https://cs.k8s.io/?q=%5CbPodAndContainerStatsFromCRI%5Cb&i=nope&files=&excludeFiles=CHANGELOG&repos=kubernetes/kubernetes) [KEPs](https://cs.k8s.io/?q=%5CbPodAndContainerStatsFromCRI%5Cb&i=nope&files=&excludeFiles=CHANGELOG&repos=kubernetes/enhancements) | diff --git a/test/compatibility_lifecycle/reference/versioned_feature_list.yaml b/test/compatibility_lifecycle/reference/versioned_feature_list.yaml index 99a40351b45..bd8274cfe31 100644 --- a/test/compatibility_lifecycle/reference/versioned_feature_list.yaml +++ b/test/compatibility_lifecycle/reference/versioned_feature_list.yaml @@ -1323,20 +1323,6 @@ lockToDefault: false preRelease: Beta version: "1.35" -- name: OrderedNamespaceDeletion - versionedSpecs: - - default: false - lockToDefault: false - preRelease: Beta - version: "1.30" - - default: true - lockToDefault: false - preRelease: Beta - version: "1.33" - - default: true - lockToDefault: true - preRelease: GA - version: "1.34" - name: PersistentVolumeClaimUnusedSinceTime versionedSpecs: - default: false