Skip to content

Commit

Permalink
Merge pull request kubernetes#110227 from aojea/cleanup
Browse files Browse the repository at this point in the history
Cleanup feature gate check for SelectorIndex
  • Loading branch information
k8s-ci-robot authored May 26, 2022
2 parents 771c62d + 209fb99 commit 32c3fb3
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 17 deletions.
9 changes: 2 additions & 7 deletions pkg/registry/core/pod/strategy.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,9 @@ import (
"k8s.io/apimachinery/pkg/types"
utilnet "k8s.io/apimachinery/pkg/util/net"
"k8s.io/apimachinery/pkg/util/validation/field"
genericfeatures "k8s.io/apiserver/pkg/features"
"k8s.io/apiserver/pkg/registry/generic"
"k8s.io/apiserver/pkg/storage"
"k8s.io/apiserver/pkg/storage/names"
utilfeature "k8s.io/apiserver/pkg/util/feature"
"k8s.io/client-go/tools/cache"
"k8s.io/kubernetes/pkg/api/legacyscheme"
podutil "k8s.io/kubernetes/pkg/api/pod"
Expand Down Expand Up @@ -293,12 +291,9 @@ func NodeNameIndexFunc(obj interface{}) ([]string, error) {

// Indexers returns the indexers for pod storage.
func Indexers() *cache.Indexers {
if utilfeature.DefaultFeatureGate.Enabled(genericfeatures.SelectorIndex) {
return &cache.Indexers{
storage.FieldIndex("spec.nodeName"): NodeNameIndexFunc,
}
return &cache.Indexers{
storage.FieldIndex("spec.nodeName"): NodeNameIndexFunc,
}
return nil
}

// ToSelectableFields returns a field set that represents the object
Expand Down
10 changes: 0 additions & 10 deletions staging/src/k8s.io/apiserver/pkg/features/kube_features.go
Original file line number Diff line number Diff line change
Expand Up @@ -139,14 +139,6 @@ const (
// Deprecates and removes SelfLink from ObjectMeta and ListMeta.
RemoveSelfLink featuregate.Feature = "RemoveSelfLink"

// owner: @shaloulcy, @wojtek-t
// alpha: v1.18
// beta: v1.19
// GA: v1.20
//
// Allows label and field based indexes in apiserver watch cache to accelerate list operations.
SelectorIndex featuregate.Feature = "SelectorIndex"

// owner: @apelisse, @lavalamp
// alpha: v1.14
// beta: v1.16
Expand Down Expand Up @@ -219,8 +211,6 @@ var defaultKubernetesFeatureGates = map[featuregate.Feature]featuregate.FeatureS

RemoveSelfLink: {Default: true, PreRelease: featuregate.GA, LockToDefault: true},

SelectorIndex: {Default: true, PreRelease: featuregate.GA, LockToDefault: true},

ServerSideApply: {Default: true, PreRelease: featuregate.GA},

ServerSideFieldValidation: {Default: false, PreRelease: featuregate.Alpha},
Expand Down

0 comments on commit 32c3fb3

Please sign in to comment.