Add support for --cluster-signing-duration KCM flag

This commit is contained in:
Ciprian Hacman 2023-10-21 07:54:50 +03:00
parent 6bb40d020c
commit 7d7a9105d6
9 changed files with 38 additions and 9 deletions

View File

@ -2061,6 +2061,10 @@ spec:
description: KubeControllerManagerConfig is the configuration for
the controller
properties:
ClusterSigningDuration:
description: ClusterSigningDuration is the max length of duration
that the signed certificates will be given. (default 365*24h)
type: string
allocateNodeCIDRs:
description: AllocateNodeCIDRs enables CIDRs for Pods to be allocated
and, if ConfigureCloudRoutes is true, to be set on the cloud
@ -2181,9 +2185,9 @@ spec:
latency, but lower number of endpoints revision generated
type: string
experimentalClusterSigningDuration:
description: ExperimentalClusterSigningDuration is the duration
that determines the length of duration that the signed certificates
will be given. (default 8760h0m0s)
description: ExperimentalClusterSigningDuration is the max length
of duration that the signed certificates will be given. (default
365*24h) Deprecated - use cluster-signing-duration instead
type: string
externalCloudVolumePlugin:
description: ExternalCloudVolumePlugin is a fallback mechanism

View File

@ -615,9 +615,11 @@ type KubeControllerManagerConfig struct {
// HorizontalPodAutoscalerUseRestClients determines if the new-style clients
// should be used if support for custom metrics is enabled.
HorizontalPodAutoscalerUseRestClients *bool `json:"horizontalPodAutoscalerUseRestClients,omitempty" flag:"horizontal-pod-autoscaler-use-rest-clients"`
// ExperimentalClusterSigningDuration is the duration that determines
// the length of duration that the signed certificates will be given. (default 8760h0m0s)
// ExperimentalClusterSigningDuration is the max length of duration that the signed certificates will be given. (default 365*24h)
// Deprecated - use cluster-signing-duration instead
ExperimentalClusterSigningDuration *metav1.Duration `json:"experimentalClusterSigningDuration,omitempty" flag:"experimental-cluster-signing-duration"`
// ClusterSigningDuration is the max length of duration that the signed certificates will be given. (default 365*24h)
ClusterSigningDuration *metav1.Duration `json:"ClusterSigningDuration,omitempty" flag:"cluster-signing-duration"`
// FeatureGates is set of key=value pairs that describe feature gates for alpha/experimental features.
FeatureGates map[string]string `json:"featureGates,omitempty" flag:"feature-gates"`
// TLSCertFile is the file containing the TLS server certificate.

View File

@ -622,9 +622,11 @@ type KubeControllerManagerConfig struct {
// HorizontalPodAutoscalerUseRestClients determines if the new-style clients
// should be used if support for custom metrics is enabled.
HorizontalPodAutoscalerUseRestClients *bool `json:"horizontalPodAutoscalerUseRestClients,omitempty" flag:"horizontal-pod-autoscaler-use-rest-clients"`
// ExperimentalClusterSigningDuration is the duration that determines
// the length of duration that the signed certificates will be given. (default 8760h0m0s)
// ExperimentalClusterSigningDuration is the max length of duration that the signed certificates will be given. (default 365*24h)
// Deprecated - use cluster-signing-duration instead
ExperimentalClusterSigningDuration *metav1.Duration `json:"experimentalClusterSigningDuration,omitempty" flag:"experimental-cluster-signing-duration"`
// ClusterSigningDuration is the max length of duration that the signed certificates will be given. (default 365*24h)
ClusterSigningDuration *metav1.Duration `json:"ClusterSigningDuration,omitempty" flag:"cluster-signing-duration"`
// FeatureGates is set of key=value pairs that describe feature gates for alpha/experimental features.
FeatureGates map[string]string `json:"featureGates,omitempty" flag:"feature-gates"`
// TLSCertFile is the file containing the TLS server certificate.

View File

@ -5110,6 +5110,7 @@ func autoConvert_v1alpha2_KubeControllerManagerConfig_To_kops_KubeControllerMana
out.HorizontalPodAutoscalerTolerance = in.HorizontalPodAutoscalerTolerance
out.HorizontalPodAutoscalerUseRestClients = in.HorizontalPodAutoscalerUseRestClients
out.ExperimentalClusterSigningDuration = in.ExperimentalClusterSigningDuration
out.ClusterSigningDuration = in.ClusterSigningDuration
out.FeatureGates = in.FeatureGates
out.TLSCertFile = in.TLSCertFile
out.TLSCipherSuites = in.TLSCipherSuites
@ -5183,6 +5184,7 @@ func autoConvert_kops_KubeControllerManagerConfig_To_v1alpha2_KubeControllerMana
out.HorizontalPodAutoscalerTolerance = in.HorizontalPodAutoscalerTolerance
out.HorizontalPodAutoscalerUseRestClients = in.HorizontalPodAutoscalerUseRestClients
out.ExperimentalClusterSigningDuration = in.ExperimentalClusterSigningDuration
out.ClusterSigningDuration = in.ClusterSigningDuration
out.FeatureGates = in.FeatureGates
out.TLSCertFile = in.TLSCertFile
out.TLSCipherSuites = in.TLSCipherSuites

View File

@ -3416,6 +3416,11 @@ func (in *KubeControllerManagerConfig) DeepCopyInto(out *KubeControllerManagerCo
*out = new(v1.Duration)
**out = **in
}
if in.ClusterSigningDuration != nil {
in, out := &in.ClusterSigningDuration, &out.ClusterSigningDuration
*out = new(v1.Duration)
**out = **in
}
if in.FeatureGates != nil {
in, out := &in.FeatureGates, &out.FeatureGates
*out = make(map[string]string, len(*in))

View File

@ -613,9 +613,11 @@ type KubeControllerManagerConfig struct {
// HorizontalPodAutoscalerUseRestClients determines if the new-style clients
// should be used if support for custom metrics is enabled.
HorizontalPodAutoscalerUseRestClients *bool `json:"horizontalPodAutoscalerUseRestClients,omitempty" flag:"horizontal-pod-autoscaler-use-rest-clients"`
// ExperimentalClusterSigningDuration is the duration that determines
// the length of duration that the signed certificates will be given. (default 8760h0m0s)
// ExperimentalClusterSigningDuration is the max length of duration that the signed certificates will be given. (default 365*24h)
// Deprecated - use cluster-signing-duration instead
ExperimentalClusterSigningDuration *metav1.Duration `json:"experimentalClusterSigningDuration,omitempty" flag:"experimental-cluster-signing-duration"`
// ClusterSigningDuration is the max length of duration that the signed certificates will be given. (default 365*24h)
ClusterSigningDuration *metav1.Duration `json:"ClusterSigningDuration,omitempty" flag:"cluster-signing-duration"`
// FeatureGates is set of key=value pairs that describe feature gates for alpha/experimental features.
FeatureGates map[string]string `json:"featureGates,omitempty" flag:"feature-gates"`
// TLSCertFile is the file containing the TLS server certificate.

View File

@ -5505,6 +5505,7 @@ func autoConvert_v1alpha3_KubeControllerManagerConfig_To_kops_KubeControllerMana
out.HorizontalPodAutoscalerTolerance = in.HorizontalPodAutoscalerTolerance
out.HorizontalPodAutoscalerUseRestClients = in.HorizontalPodAutoscalerUseRestClients
out.ExperimentalClusterSigningDuration = in.ExperimentalClusterSigningDuration
out.ClusterSigningDuration = in.ClusterSigningDuration
out.FeatureGates = in.FeatureGates
out.TLSCertFile = in.TLSCertFile
out.TLSCipherSuites = in.TLSCipherSuites
@ -5578,6 +5579,7 @@ func autoConvert_kops_KubeControllerManagerConfig_To_v1alpha3_KubeControllerMana
out.HorizontalPodAutoscalerTolerance = in.HorizontalPodAutoscalerTolerance
out.HorizontalPodAutoscalerUseRestClients = in.HorizontalPodAutoscalerUseRestClients
out.ExperimentalClusterSigningDuration = in.ExperimentalClusterSigningDuration
out.ClusterSigningDuration = in.ClusterSigningDuration
out.FeatureGates = in.FeatureGates
out.TLSCertFile = in.TLSCertFile
out.TLSCipherSuites = in.TLSCipherSuites

View File

@ -3390,6 +3390,11 @@ func (in *KubeControllerManagerConfig) DeepCopyInto(out *KubeControllerManagerCo
*out = new(v1.Duration)
**out = **in
}
if in.ClusterSigningDuration != nil {
in, out := &in.ClusterSigningDuration, &out.ClusterSigningDuration
*out = new(v1.Duration)
**out = **in
}
if in.FeatureGates != nil {
in, out := &in.FeatureGates, &out.FeatureGates
*out = make(map[string]string, len(*in))

View File

@ -3569,6 +3569,11 @@ func (in *KubeControllerManagerConfig) DeepCopyInto(out *KubeControllerManagerCo
*out = new(v1.Duration)
**out = **in
}
if in.ClusterSigningDuration != nil {
in, out := &in.ClusterSigningDuration, &out.ClusterSigningDuration
*out = new(v1.Duration)
**out = **in
}
if in.FeatureGates != nil {
in, out := &in.FeatureGates, &out.FeatureGates
*out = make(map[string]string, len(*in))