diff --git a/pkg/features/kube_features.go b/pkg/features/kube_features.go index 679aac379c1a1..d0a20311717bd 100644 --- a/pkg/features/kube_features.go +++ b/pkg/features/kube_features.go @@ -1206,8 +1206,6 @@ var defaultKubernetesFeatureGates = map[featuregate.Feature]featuregate.FeatureS genericfeatures.AggregatedDiscoveryEndpoint: {Default: true, PreRelease: featuregate.GA, LockToDefault: true}, // remove in 1.33 - genericfeatures.AnonymousAuthConfigurableEndpoints: {Default: false, PreRelease: featuregate.Alpha}, - genericfeatures.APIListChunking: {Default: true, PreRelease: featuregate.GA, LockToDefault: true}, // remove in 1.32 genericfeatures.APIResponseCompression: {Default: true, PreRelease: featuregate.Beta}, diff --git a/pkg/features/versioned_kube_features.go b/pkg/features/versioned_kube_features.go index 34d6b355ee48a..7a631740f4b62 100644 --- a/pkg/features/versioned_kube_features.go +++ b/pkg/features/versioned_kube_features.go @@ -18,6 +18,7 @@ package features import ( "k8s.io/apimachinery/pkg/util/version" + genericfeatures "k8s.io/apiserver/pkg/features" "k8s.io/component-base/featuregate" ) @@ -25,12 +26,18 @@ import ( // To add a new feature, define a key for it and add it here. The features will be // available throughout Kubernetes binaries. // -// Entries are separated from each other with blank lines to avoid sweeping gofmt changes +// Entries are alphabetized and separated from each other with blank lines to avoid sweeping gofmt changes // when adding or removing one entry. var defaultVersionedKubernetesFeatureGates = map[featuregate.Feature]featuregate.VersionedSpecs{ + genericfeatures.AnonymousAuthConfigurableEndpoints: { + {Version: version.MustParse("1.31"), Default: false, PreRelease: featuregate.Alpha}, + {Version: version.MustParse("1.32"), Default: true, PreRelease: featuregate.Beta}, + }, + RelaxedEnvironmentVariableValidation: { {Version: version.MustParse("1.30"), Default: false, PreRelease: featuregate.Alpha}, }, + VolumeAttributesClass: { {Version: version.MustParse("1.29"), Default: false, PreRelease: featuregate.Alpha}, {Version: version.MustParse("1.31"), Default: false, PreRelease: featuregate.Beta}, diff --git a/staging/src/k8s.io/apiserver/pkg/features/kube_features.go b/staging/src/k8s.io/apiserver/pkg/features/kube_features.go index 1fd3b8e000387..211e4886678d4 100644 --- a/staging/src/k8s.io/apiserver/pkg/features/kube_features.go +++ b/staging/src/k8s.io/apiserver/pkg/features/kube_features.go @@ -18,6 +18,7 @@ package features import ( "k8s.io/apimachinery/pkg/util/runtime" + "k8s.io/apimachinery/pkg/util/version" utilfeature "k8s.io/apiserver/pkg/util/feature" "k8s.io/component-base/featuregate" ) @@ -55,6 +56,7 @@ const ( // owner: @vinayakankugoyal // kep: https://kep.k8s.io/4633 // alpha: v1.31 + // beta: v1.32 // // Allows us to enable anonymous auth for only certain apiserver endpoints. AnonymousAuthConfigurableEndpoints featuregate.Feature = "AnonymousAuthConfigurableEndpoints" @@ -313,11 +315,19 @@ func init() { // defaultVersionedKubernetesFeatureGates consists of all known Kubernetes-specific feature keys with VersionedSpecs. // To add a new feature, define a key for it above and add it here. The features will be // available throughout Kubernetes binaries. +// +// Entries are alphabetized and separated from each other with blank lines to avoid sweeping gofmt changes +// when adding or removing one entry. var defaultVersionedKubernetesFeatureGates = map[featuregate.Feature]featuregate.VersionedSpecs{ // Example: // EmulationVersion: { // {Version: version.MustParse("1.30"), Default: false, PreRelease: featuregate.Alpha}, // }, + + AnonymousAuthConfigurableEndpoints: { + {Version: version.MustParse("1.31"), Default: false, PreRelease: featuregate.Alpha}, + {Version: version.MustParse("1.32"), Default: true, PreRelease: featuregate.Beta}, + }, } // defaultKubernetesFeatureGates consists of all known Kubernetes-specific feature keys. @@ -325,8 +335,6 @@ var defaultVersionedKubernetesFeatureGates = map[featuregate.Feature]featuregate // available throughout Kubernetes binaries. var defaultKubernetesFeatureGates = map[featuregate.Feature]featuregate.FeatureSpec{ - AnonymousAuthConfigurableEndpoints: {Default: false, PreRelease: featuregate.Alpha}, - AggregatedDiscoveryEndpoint: {Default: true, PreRelease: featuregate.GA, LockToDefault: true}, // remove in 1.33 AdmissionWebhookMatchConditions: {Default: true, PreRelease: featuregate.GA, LockToDefault: true}, // remove in 1.33 diff --git a/test/featuregates_linter/test_data/unversioned_feature_list.yaml b/test/featuregates_linter/test_data/unversioned_feature_list.yaml index 49c54e051e63e..8f0b7a8b9aead 100644 --- a/test/featuregates_linter/test_data/unversioned_feature_list.yaml +++ b/test/featuregates_linter/test_data/unversioned_feature_list.yaml @@ -22,12 +22,6 @@ lockToDefault: false preRelease: Deprecated version: "" -- name: AnonymousAuthConfigurableEndpoints - versionedSpecs: - - default: false - lockToDefault: false - preRelease: Alpha - version: "" - name: AnyVolumeDataSource versionedSpecs: - default: true diff --git a/test/featuregates_linter/test_data/versioned_feature_list.yaml b/test/featuregates_linter/test_data/versioned_feature_list.yaml index a985536a5269a..7aee00b51b658 100644 --- a/test/featuregates_linter/test_data/versioned_feature_list.yaml +++ b/test/featuregates_linter/test_data/versioned_feature_list.yaml @@ -1,3 +1,13 @@ +- name: AnonymousAuthConfigurableEndpoints + versionedSpecs: + - default: false + lockToDefault: false + preRelease: Alpha + version: "1.31" + - default: true + lockToDefault: false + preRelease: Beta + version: "1.32" - name: RelaxedEnvironmentVariableValidation versionedSpecs: - default: false