Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

kubeadm: deprecate the flag --use-api for cert renewal #88827

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
7 changes: 6 additions & 1 deletion cmd/kubeadm/app/cmd/alpha/certs.go
Expand Up @@ -43,7 +43,7 @@ var (
genericCertRenewLongDesc = cmdutil.LongDesc(`
Renew the %s.

Renewals run unconditionally, regardless of certificate expiration date; extra attributes such as SANs will
Renewals run unconditionally, regardless of certificate expiration date; extra attributes such as SANs will
be based on the existing file/certificates, there is no need to resupply them.

Renewal by default tries to use the certificate authority in the local PKI managed by kubeadm; as alternative
Expand Down Expand Up @@ -208,7 +208,12 @@ func addRenewFlags(cmd *cobra.Command, flags *renewFlags) {
options.AddKubeConfigFlag(cmd.Flags(), &flags.kubeconfigPath)
options.AddCSRFlag(cmd.Flags(), &flags.csrOnly)
options.AddCSRDirFlag(cmd.Flags(), &flags.csrPath)
// TODO: remove the flag and related logic once legacy signers are removed,
// potentially with the release of certificates.k8s.io/v1:
// https://github.com/kubernetes/kubeadm/issues/2047
cmd.Flags().BoolVar(&flags.useAPI, "use-api", flags.useAPI, "Use the Kubernetes certificate API to renew certificates")
cmd.Flags().MarkDeprecated("use-api", "certificate renewal from kubeadm using the Kubernetes API "+
"is deprecated and will be removed when 'certificates.k8s.io/v1' releases.")
}

func renewCert(flags *renewFlags, kdir string, internalcfg *kubeadmapi.InitConfiguration, handler *renewal.CertificateRenewHandler) error {
Expand Down