Change:
This avoids drift between Kubernetes components and allows for cluster management tools that pass uniform feature gates to all components. xref:
/assign
Hey I f you stuck anywhere. Please free to involve me in this.

Discussion:
rc=1 fi <ins> # ensure all generic features are added in alphabetic order lines=$(git grep 'genericfeatures[.].*:' -- pkg/features/kube_features.go) sorted_lines=$(echo "$lines" | sort -f) if [[ "$lines" != "$sorted_lines" ]]; then echo "Generic features in pkg/features/kube_features.go not sorted" >&2 echo >&2 echo "Expected:" >&2 echo "$sorted_lines" >&2 echo >&2 echo "Got:" >&2 echo "$lines" >&2 rc=1 fi </ins> exit $rc

genericfeatures.APIResponseCompression: {Default: true, PreRelease: featuregate.Beta}, <ins> genericfeatures.APIServerIdentity: {Default: true, PreRelease: featuregate.Beta}, genericfeatures.APIServerTracing: {Default: true, PreRelease: featuregate.Beta}, genericfeatures.ConsistentListFromCache: {Default: false, PreRelease: featuregate.Alpha}, genericfeatures.CustomResourceValidationExpressions: {Default: true, PreRelease: featuregate.GA, LockToDefault: true}, // remove in 1.31 genericfeatures.EfficientWatchResumption: {Default: true, PreRelease: featuregate.GA, LockToDefault: true}, </ins> genericfeatures.KMSv1: {Default: false, PreRelease: featuregate.Deprecated}, genericfeatures.KMSv2: {Default: true, PreRelease: featuregate.GA, LockToDefault: true}, // remove in 1.31 genericfeatures.KMSv2KDF: {Default: true, PreRelease: featuregate.GA, LockToDefault: true}, // remove in 1.31 <del> genericfeatures.ValidatingAdmissionPolicy: {Default: false, PreRelease: featuregate.Beta}, genericfeatures.CustomResourceValidationExpressions: {Default: true, PreRelease: featuregate.GA, LockToDefault: true}, // remove in 1.31 </del> genericfeatures.OpenAPIEnums: {Default: true, PreRelease: featuregate.Beta}, <ins> genericfeatures.RemainingItemCount: {Default: true, PreRelease: featuregate.GA, LockToDefault: true}, </ins> genericfeatures.ServerSideApply: {Default: true, PreRelease: featuregate.GA, LockToDefault: true}, // remove in 1.29 genericfeatures.ServerSideFieldValidation: {Default: true, PreRelease: featuregate.GA, LockToDefault: true}, // remove in 1.29 <ins> genericfeatures.StorageVersionAPI: {Default: false, PreRelease: featuregate.Alpha}, genericfeatures.StorageVersionHash: {Default: true, PreRelease: featuregate.Beta}, </ins> genericfeatures.StructuredAuthenticationConfiguration: {Default: false, PreRelease: featuregate.Alpha}, genericfeatures.StructuredAuthorizationConfiguration: {Default: false, PreRelease: featuregate.Alpha}, genericfeatures.UnauthenticatedHTTP2DOSMitigation: {Default: true, PreRelease: featuregate.Beta}, <ins> genericfeatures.ValidatingAdmissionPolicy: {Default: false, PreRelease: featuregate.Beta}, genericfeatures.WatchBookmark: {Default: true, PreRelease: featuregate.GA, LockToDefault: true}, genericfeatures.WatchList: {Default: false, PreRelease: featuregate.Alpha}, </ins> genericfeatures.ZeroLimitedNominalConcurrencyShares: {Default: false, PreRelease: featuregate.Beta}, // inherited features from apiextensions-apiserver, relisted here to get a conflict if it is changed

<ins> /* Copyright 2024 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package features import ( utilfeature "k8s.io/apiserver/pkg/util/feature" "testing" ) func TestKubeFeatures(t *testing.T) { features := utilfeature.DefaultFeatureGate.DeepCopy().GetAll() for i := range features { featureName := string(i) if featureName == "AllAlpha" || featureName == "AllBeta" { continue } if _, ok := defaultKubernetesFeatureGates[i]; !ok { t.Errorf("The feature gate %q is not registered", featureName) } } } </ins>