Skip to content

Commit

Permalink
KEP-4633: Graduate to BETA.
Browse files Browse the repository at this point in the history
Signed-off-by: Vinayak Goyal <vinaygo@google.com>
  • Loading branch information
vinayakankugoyal committed Sep 3, 2024
1 parent 1a0804c commit 8a4e23e
Show file tree
Hide file tree
Showing 5 changed files with 28 additions and 11 deletions.
2 changes: 0 additions & 2 deletions pkg/features/kube_features.go
Original file line number Diff line number Diff line change
Expand Up @@ -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},
Expand Down
9 changes: 8 additions & 1 deletion pkg/features/versioned_kube_features.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,19 +18,26 @@ package features

import (
"k8s.io/apimachinery/pkg/util/version"
genericfeatures "k8s.io/apiserver/pkg/features"
"k8s.io/component-base/featuregate"
)

// defaultVersionedKubernetesFeatureGates consists of all known Kubernetes-specific feature keys with VersionedSpecs.
// 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},
Expand Down
12 changes: 10 additions & 2 deletions staging/src/k8s.io/apiserver/pkg/features/kube_features.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
)
Expand Down Expand Up @@ -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"
Expand Down Expand Up @@ -313,20 +315,26 @@ 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.
// To add a new feature, define a key for it above and add it here. The features will be
// 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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,6 @@
lockToDefault: false
preRelease: Deprecated
version: ""
- name: AnonymousAuthConfigurableEndpoints
versionedSpecs:
- default: false
lockToDefault: false
preRelease: Alpha
version: ""
- name: AnyVolumeDataSource
versionedSpecs:
- default: true
Expand Down
10 changes: 10 additions & 0 deletions test/featuregates_linter/test_data/versioned_feature_list.yaml
Original file line number Diff line number Diff line change
@@ -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
Expand Down

0 comments on commit 8a4e23e

Please sign in to comment.