Skip to content

Commit 71d77b5

Browse files
committed
Promote RotateKubeletClientCertificate to GA
1 parent fbcd0f8 commit 71d77b5

File tree

5 files changed

+5
-9
lines changed

5 files changed

+5
-9
lines changed

cmd/kubelet/app/server.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -806,7 +806,7 @@ func run(s *options.KubeletServer, kubeDeps *kubelet.Dependencies, featureGate f
806806
// buildKubeletClientConfig constructs the appropriate client config for the kubelet depending on whether
807807
// bootstrapping is enabled or client certificate rotation is enabled.
808808
func buildKubeletClientConfig(s *options.KubeletServer, nodeName types.NodeName) (*restclient.Config, func(), error) {
809-
if s.RotateCertificates && utilfeature.DefaultFeatureGate.Enabled(features.RotateKubeletClientCertificate) {
809+
if s.RotateCertificates {
810810
// Rules for client rotation and the handling of kube config files:
811811
//
812812
// 1. If the client provides only a kubeconfig file, we must use that as the initial client

pkg/features/kube_features.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,7 @@ const (
7878

7979
// owner: @mikedanese
8080
// beta: v1.8
81+
// ga: v1.19
8182
//
8283
// Automatically renews the client certificate used for communicating with
8384
// the API server as the certificate approaches expiration.
@@ -593,7 +594,7 @@ var defaultKubernetesFeatureGates = map[featuregate.Feature]featuregate.FeatureS
593594
DevicePlugins: {Default: true, PreRelease: featuregate.Beta},
594595
TaintBasedEvictions: {Default: true, PreRelease: featuregate.GA, LockToDefault: true}, // remove in 1.19
595596
RotateKubeletServerCertificate: {Default: true, PreRelease: featuregate.Beta},
596-
RotateKubeletClientCertificate: {Default: true, PreRelease: featuregate.Beta},
597+
RotateKubeletClientCertificate: {Default: true, PreRelease: featuregate.GA, LockToDefault: true}, // remove in 1.20
597598
LocalStorageCapacityIsolation: {Default: true, PreRelease: featuregate.Beta},
598599
Sysctls: {Default: true, PreRelease: featuregate.Beta},
599600
EphemeralContainers: {Default: false, PreRelease: featuregate.Alpha},

pkg/kubelet/apis/config/types.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -122,8 +122,7 @@ type KubeletConfiguration struct {
122122
TLSMinVersion string
123123
// rotateCertificates enables client certificate rotation. The Kubelet will request a
124124
// new certificate from the certificates.k8s.io API. This requires an approver to approve the
125-
// certificate signing requests. The RotateKubeletClientCertificate feature
126-
// must be enabled.
125+
// certificate signing requests.
127126
RotateCertificates bool
128127
// serverTLSBootstrap enables server certificate bootstrap. Instead of self
129128
// signing a serving certificate, the Kubelet will request a certificate from

pkg/kubelet/apis/config/validation/validation.go

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -110,9 +110,6 @@ func ValidateKubeletConfiguration(kc *kubeletconfig.KubeletConfiguration) error
110110
if kc.RegistryPullQPS < 0 {
111111
allErrors = append(allErrors, fmt.Errorf("invalid configuration: RegistryPullQPS (--registry-qps) %v must not be a negative number", kc.RegistryPullQPS))
112112
}
113-
if kc.RotateCertificates && !localFeatureGate.Enabled(features.RotateKubeletClientCertificate) {
114-
allErrors = append(allErrors, fmt.Errorf("invalid configuration: RotateCertificates %v requires feature gate RotateKubeletClientCertificate", kc.RotateCertificates))
115-
}
116113
if kc.ServerTLSBootstrap && !localFeatureGate.Enabled(features.RotateKubeletServerCertificate) {
117114
allErrors = append(allErrors, fmt.Errorf("invalid configuration: ServerTLSBootstrap %v requires feature gate RotateKubeletServerCertificate", kc.ServerTLSBootstrap))
118115
}

staging/src/k8s.io/kubelet/config/v1beta1/types.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -177,8 +177,7 @@ type KubeletConfiguration struct {
177177
TLSMinVersion string `json:"tlsMinVersion,omitempty"`
178178
// rotateCertificates enables client certificate rotation. The Kubelet will request a
179179
// new certificate from the certificates.k8s.io API. This requires an approver to approve the
180-
// certificate signing requests. The RotateKubeletClientCertificate feature
181-
// must be enabled.
180+
// certificate signing requests.
182181
// Dynamic Kubelet Config (beta): If dynamically updating this field, consider that
183182
// disabling it may disrupt the Kubelet's ability to authenticate with the API server
184183
// after the current certificate expires.

0 commit comments

Comments
 (0)