mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-05 10:19:50 +00:00
port kcm feature to versioned
This commit is contained in:
parent
c9a999df1a
commit
de2e232a85
@ -157,12 +157,6 @@ const (
|
|||||||
// Enables kubelet to detect CSI volume condition and send the event of the abnormal volume to the corresponding pod that is using it.
|
// Enables kubelet to detect CSI volume condition and send the event of the abnormal volume to the corresponding pod that is using it.
|
||||||
CSIVolumeHealth featuregate.Feature = "CSIVolumeHealth"
|
CSIVolumeHealth featuregate.Feature = "CSIVolumeHealth"
|
||||||
|
|
||||||
// owner: @nckturner
|
|
||||||
// kep: http://kep.k8s.io/2699
|
|
||||||
// alpha: v1.27
|
|
||||||
// Enable webhooks in cloud controller manager
|
|
||||||
CloudControllerManagerWebhook featuregate.Feature = "CloudControllerManagerWebhook"
|
|
||||||
|
|
||||||
// owner: @adrianreber
|
// owner: @adrianreber
|
||||||
// kep: https://kep.k8s.io/2008
|
// kep: https://kep.k8s.io/2008
|
||||||
// alpha: v1.25
|
// alpha: v1.25
|
||||||
@ -972,9 +966,5 @@ var defaultKubernetesFeatureGates = map[featuregate.Feature]featuregate.FeatureS
|
|||||||
|
|
||||||
genericfeatures.KMSv1: {Default: false, PreRelease: featuregate.Deprecated},
|
genericfeatures.KMSv1: {Default: false, PreRelease: featuregate.Deprecated},
|
||||||
|
|
||||||
// features with duplicate definition in apiserver/controller-manager
|
|
||||||
|
|
||||||
CloudControllerManagerWebhook: {Default: false, PreRelease: featuregate.Alpha},
|
|
||||||
|
|
||||||
InPlacePodVerticalScaling: {Default: false, PreRelease: featuregate.Alpha},
|
InPlacePodVerticalScaling: {Default: false, PreRelease: featuregate.Alpha},
|
||||||
}
|
}
|
||||||
|
@ -21,6 +21,7 @@ import (
|
|||||||
"k8s.io/apimachinery/pkg/util/version"
|
"k8s.io/apimachinery/pkg/util/version"
|
||||||
genericfeatures "k8s.io/apiserver/pkg/features"
|
genericfeatures "k8s.io/apiserver/pkg/features"
|
||||||
"k8s.io/component-base/featuregate"
|
"k8s.io/component-base/featuregate"
|
||||||
|
kcmfeatures "k8s.io/controller-manager/pkg/features"
|
||||||
)
|
)
|
||||||
|
|
||||||
// defaultVersionedKubernetesFeatureGates consists of all known Kubernetes-specific feature keys with VersionedSpecs.
|
// defaultVersionedKubernetesFeatureGates consists of all known Kubernetes-specific feature keys with VersionedSpecs.
|
||||||
@ -64,6 +65,10 @@ var defaultVersionedKubernetesFeatureGates = map[featuregate.Feature]featuregate
|
|||||||
{Version: version.MustParse("1.31"), Default: false, PreRelease: featuregate.Alpha},
|
{Version: version.MustParse("1.31"), Default: false, PreRelease: featuregate.Alpha},
|
||||||
},
|
},
|
||||||
|
|
||||||
|
kcmfeatures.CloudControllerManagerWebhook: {
|
||||||
|
{Version: version.MustParse("1.27"), Default: false, PreRelease: featuregate.Alpha},
|
||||||
|
},
|
||||||
|
|
||||||
ClusterTrustBundle: {
|
ClusterTrustBundle: {
|
||||||
{Version: version.MustParse("1.27"), Default: false, PreRelease: featuregate.Alpha},
|
{Version: version.MustParse("1.27"), Default: false, PreRelease: featuregate.Alpha},
|
||||||
},
|
},
|
||||||
|
@ -17,6 +17,7 @@ limitations under the License.
|
|||||||
package features
|
package features
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"k8s.io/apimachinery/pkg/util/version"
|
||||||
"k8s.io/component-base/featuregate"
|
"k8s.io/component-base/featuregate"
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -39,12 +40,14 @@ const (
|
|||||||
CloudControllerManagerWebhook featuregate.Feature = "CloudControllerManagerWebhook"
|
CloudControllerManagerWebhook featuregate.Feature = "CloudControllerManagerWebhook"
|
||||||
)
|
)
|
||||||
|
|
||||||
func SetupCurrentKubernetesSpecificFeatureGates(featuregates featuregate.MutableFeatureGate) error {
|
func SetupCurrentKubernetesSpecificFeatureGates(featuregates featuregate.MutableVersionedFeatureGate) error {
|
||||||
return featuregates.Add(cloudPublicFeatureGates)
|
return featuregates.AddVersioned(versionedCloudPublicFeatureGates)
|
||||||
}
|
}
|
||||||
|
|
||||||
// cloudPublicFeatureGates consists of cloud-specific feature keys.
|
// versionedCloudPublicFeatureGates consists of versioned cloud-specific feature keys.
|
||||||
// To add a new feature, define a key for it at k8s.io/api/pkg/features and add it here.
|
// To add a new feature, define a key for it above and add it here.
|
||||||
var cloudPublicFeatureGates = map[featuregate.Feature]featuregate.FeatureSpec{
|
var versionedCloudPublicFeatureGates = map[featuregate.Feature]featuregate.VersionedSpecs{
|
||||||
CloudControllerManagerWebhook: {Default: false, PreRelease: featuregate.Alpha},
|
CloudControllerManagerWebhook: {
|
||||||
|
{Version: version.MustParse("1.27"), Default: false, PreRelease: featuregate.Alpha},
|
||||||
|
},
|
||||||
}
|
}
|
||||||
|
@ -1,9 +1,3 @@
|
|||||||
- name: CloudControllerManagerWebhook
|
|
||||||
versionedSpecs:
|
|
||||||
- default: false
|
|
||||||
lockToDefault: false
|
|
||||||
preRelease: Alpha
|
|
||||||
version: ""
|
|
||||||
- name: ComponentSLIs
|
- name: ComponentSLIs
|
||||||
versionedSpecs:
|
versionedSpecs:
|
||||||
- default: true
|
- default: true
|
||||||
|
@ -146,6 +146,12 @@
|
|||||||
lockToDefault: false
|
lockToDefault: false
|
||||||
preRelease: Alpha
|
preRelease: Alpha
|
||||||
version: "1.31"
|
version: "1.31"
|
||||||
|
- name: CloudControllerManagerWebhook
|
||||||
|
versionedSpecs:
|
||||||
|
- default: false
|
||||||
|
lockToDefault: false
|
||||||
|
preRelease: Alpha
|
||||||
|
version: "1.27"
|
||||||
- name: ClusterTrustBundle
|
- name: ClusterTrustBundle
|
||||||
versionedSpecs:
|
versionedSpecs:
|
||||||
- default: false
|
- default: false
|
||||||
|
Loading…
Reference in New Issue
Block a user