diff --git a/cluster/gce/gci/configure-helper.sh b/cluster/gce/gci/configure-helper.sh index 58ba60f4b5d..a9d0da9aa9f 100644 --- a/cluster/gce/gci/configure-helper.sh +++ b/cluster/gce/gci/configure-helper.sh @@ -1898,7 +1898,7 @@ function start-kube-controller-manager { params+=" --flex-volume-plugin-dir=${VOLUME_PLUGIN_DIR}" fi if [[ -n "${CLUSTER_SIGNING_DURATION:-}" ]]; then - params+=" --experimental-cluster-signing-duration=$CLUSTER_SIGNING_DURATION" + params+=" --cluster-signing-duration=$CLUSTER_SIGNING_DURATION" fi # Disable using HPA metrics REST clients if metrics-server isn't enabled, # or if we want to explicitly disable it by setting HPA_USE_REST_CLIENT. diff --git a/cmd/kube-controller-manager/app/options/csrsigningcontroller.go b/cmd/kube-controller-manager/app/options/csrsigningcontroller.go index 251de045c99..f9477449cc7 100644 --- a/cmd/kube-controller-manager/app/options/csrsigningcontroller.go +++ b/cmd/kube-controller-manager/app/options/csrsigningcontroller.go @@ -45,7 +45,9 @@ func (o *CSRSigningControllerOptions) AddFlags(fs *pflag.FlagSet) { fs.StringVar(&o.ClusterSigningCertFile, "cluster-signing-cert-file", o.ClusterSigningCertFile, "Filename containing a PEM-encoded X509 CA certificate used to issue cluster-scoped certificates") fs.StringVar(&o.ClusterSigningKeyFile, "cluster-signing-key-file", o.ClusterSigningKeyFile, "Filename containing a PEM-encoded RSA or ECDSA private key used to sign cluster-scoped certificates") + fs.DurationVar(&o.ClusterSigningDuration.Duration, "cluster-signing-duration", o.ClusterSigningDuration.Duration, "The length of duration signed certificates will be given.") fs.DurationVar(&o.ClusterSigningDuration.Duration, "experimental-cluster-signing-duration", o.ClusterSigningDuration.Duration, "The length of duration signed certificates will be given.") + fs.MarkDeprecated("experimental-cluster-signing-duration", "use --cluster-signing-duration") } // ApplyTo fills up CSRSigningController config with options. diff --git a/cmd/kube-controller-manager/app/options/options_test.go b/cmd/kube-controller-manager/app/options/options_test.go index 3cf81f70d2c..5240d15d510 100644 --- a/cmd/kube-controller-manager/app/options/options_test.go +++ b/cmd/kube-controller-manager/app/options/options_test.go @@ -88,7 +88,7 @@ var args = []string{ "--enable-garbage-collector=false", "--enable-hostpath-provisioner=true", "--enable-taint-manager=false", - "--experimental-cluster-signing-duration=10h", + "--cluster-signing-duration=10h", "--flex-volume-plugin-dir=/flex-volume-plugin", "--horizontal-pod-autoscaler-downscale-delay=2m", "--horizontal-pod-autoscaler-sync-period=45s",