mirror of https://github.com/k3s-io/k3s
kubeadm: include the 'certs renew' sub-command in the CLI
The command seems to be missing in the CLI. Add it as sub-command under 'kubeadm alpha phase certs'.pull/8/head
parent
4924bd53ec
commit
48d52a3075
|
@ -25,6 +25,7 @@ go_library(
|
|||
"//cmd/kubeadm/app/apis/kubeadm/v1alpha3:go_default_library",
|
||||
"//cmd/kubeadm/app/apis/kubeadm/validation:go_default_library",
|
||||
"//cmd/kubeadm/app/cmd/options:go_default_library",
|
||||
"//cmd/kubeadm/app/cmd/phases/certs:go_default_library",
|
||||
"//cmd/kubeadm/app/cmd/util:go_default_library",
|
||||
"//cmd/kubeadm/app/constants:go_default_library",
|
||||
"//cmd/kubeadm/app/features:go_default_library",
|
||||
|
|
|
@ -26,6 +26,7 @@ import (
|
|||
kubeadmscheme "k8s.io/kubernetes/cmd/kubeadm/app/apis/kubeadm/scheme"
|
||||
kubeadmapiv1alpha3 "k8s.io/kubernetes/cmd/kubeadm/app/apis/kubeadm/v1alpha3"
|
||||
"k8s.io/kubernetes/cmd/kubeadm/app/cmd/options"
|
||||
certscmdphase "k8s.io/kubernetes/cmd/kubeadm/app/cmd/phases/certs"
|
||||
cmdutil "k8s.io/kubernetes/cmd/kubeadm/app/cmd/util"
|
||||
kubeadmconstants "k8s.io/kubernetes/cmd/kubeadm/app/constants"
|
||||
certsphase "k8s.io/kubernetes/cmd/kubeadm/app/phases/certs"
|
||||
|
@ -120,7 +121,10 @@ func getCertsSubCommands(defaultKubernetesVersion string) []*cobra.Command {
|
|||
}
|
||||
addFlags(saCmd, &cfgPath, cfg, false)
|
||||
|
||||
subCmds := []*cobra.Command{allCmd, saCmd}
|
||||
// "renew" command
|
||||
renewCmd := certscmdphase.NewCmdCertsRenewal()
|
||||
|
||||
subCmds := []*cobra.Command{allCmd, saCmd, renewCmd}
|
||||
|
||||
certTree, err := certsphase.GetDefaultCertList().AsMap().CertTree()
|
||||
kubeadmutil.CheckErr(err)
|
||||
|
|
|
@ -50,7 +50,7 @@ var (
|
|||
func NewCmdCertsRenewal() *cobra.Command {
|
||||
cmd := &cobra.Command{
|
||||
Use: "renew",
|
||||
Short: "Renews certificates for a kubernetes cluster",
|
||||
Short: "Renews certificates for a Kubernetes cluster",
|
||||
Long: cmdutil.MacroCommandLongDescription,
|
||||
RunE: cmdutil.SubCmdRunE("renew"),
|
||||
}
|
||||
|
@ -110,7 +110,7 @@ func addFlags(cmd *cobra.Command, cfg *renewConfig) {
|
|||
options.AddConfigFlag(cmd.Flags(), &cfg.cfgPath)
|
||||
options.AddCertificateDirFlag(cmd.Flags(), &cfg.cfg.CertificatesDir)
|
||||
options.AddKubeConfigFlag(cmd.Flags(), &cfg.kubeconfigPath)
|
||||
cmd.Flags().BoolVar(&cfg.useAPI, "use-api", cfg.useAPI, "Use the kubernetes certificate API to renew certificates")
|
||||
cmd.Flags().BoolVar(&cfg.useAPI, "use-api", cfg.useAPI, "Use the Kubernetes certificate API to renew certificates")
|
||||
}
|
||||
|
||||
// generateCertCommand takes mostly strings instead of structs to avoid using structs in a for loop
|
||||
|
|
|
@ -30,6 +30,15 @@ docs/admin/kubeadm_alpha_phase_certs_etcd-peer.md
|
|||
docs/admin/kubeadm_alpha_phase_certs_etcd-server.md
|
||||
docs/admin/kubeadm_alpha_phase_certs_front-proxy-ca.md
|
||||
docs/admin/kubeadm_alpha_phase_certs_front-proxy-client.md
|
||||
docs/admin/kubeadm_alpha_phase_certs_renew.md
|
||||
docs/admin/kubeadm_alpha_phase_certs_renew_all.md
|
||||
docs/admin/kubeadm_alpha_phase_certs_renew_apiserver-etcd-client.md
|
||||
docs/admin/kubeadm_alpha_phase_certs_renew_apiserver-kubelet-client.md
|
||||
docs/admin/kubeadm_alpha_phase_certs_renew_apiserver.md
|
||||
docs/admin/kubeadm_alpha_phase_certs_renew_etcd-healthcheck-client.md
|
||||
docs/admin/kubeadm_alpha_phase_certs_renew_etcd-peer.md
|
||||
docs/admin/kubeadm_alpha_phase_certs_renew_etcd-server.md
|
||||
docs/admin/kubeadm_alpha_phase_certs_renew_front-proxy-client.md
|
||||
docs/admin/kubeadm_alpha_phase_certs_sa.md
|
||||
docs/admin/kubeadm_alpha_phase_controlplane.md
|
||||
docs/admin/kubeadm_alpha_phase_controlplane_all.md
|
||||
|
@ -115,6 +124,15 @@ docs/man/man1/kubeadm-alpha-phase-certs-etcd-peer.1
|
|||
docs/man/man1/kubeadm-alpha-phase-certs-etcd-server.1
|
||||
docs/man/man1/kubeadm-alpha-phase-certs-front-proxy-ca.1
|
||||
docs/man/man1/kubeadm-alpha-phase-certs-front-proxy-client.1
|
||||
docs/man/man1/kubeadm-alpha-phase-certs-renew-all.1
|
||||
docs/man/man1/kubeadm-alpha-phase-certs-renew-apiserver-etcd-client.1
|
||||
docs/man/man1/kubeadm-alpha-phase-certs-renew-apiserver-kubelet-client.1
|
||||
docs/man/man1/kubeadm-alpha-phase-certs-renew-apiserver.1
|
||||
docs/man/man1/kubeadm-alpha-phase-certs-renew-etcd-healthcheck-client.1
|
||||
docs/man/man1/kubeadm-alpha-phase-certs-renew-etcd-peer.1
|
||||
docs/man/man1/kubeadm-alpha-phase-certs-renew-etcd-server.1
|
||||
docs/man/man1/kubeadm-alpha-phase-certs-renew-front-proxy-client.1
|
||||
docs/man/man1/kubeadm-alpha-phase-certs-renew.1
|
||||
docs/man/man1/kubeadm-alpha-phase-certs-sa.1
|
||||
docs/man/man1/kubeadm-alpha-phase-certs.1
|
||||
docs/man/man1/kubeadm-alpha-phase-controlplane-all.1
|
||||
|
|
|
@ -0,0 +1,3 @@
|
|||
This file is autogenerated, but we've stopped checking such files into the
|
||||
repository to reduce the need for rebases. Please run hack/generate-docs.sh to
|
||||
populate this file.
|
|
@ -0,0 +1,3 @@
|
|||
This file is autogenerated, but we've stopped checking such files into the
|
||||
repository to reduce the need for rebases. Please run hack/generate-docs.sh to
|
||||
populate this file.
|
|
@ -0,0 +1,3 @@
|
|||
This file is autogenerated, but we've stopped checking such files into the
|
||||
repository to reduce the need for rebases. Please run hack/generate-docs.sh to
|
||||
populate this file.
|
|
@ -0,0 +1,3 @@
|
|||
This file is autogenerated, but we've stopped checking such files into the
|
||||
repository to reduce the need for rebases. Please run hack/generate-docs.sh to
|
||||
populate this file.
|
|
@ -0,0 +1,3 @@
|
|||
This file is autogenerated, but we've stopped checking such files into the
|
||||
repository to reduce the need for rebases. Please run hack/generate-docs.sh to
|
||||
populate this file.
|
|
@ -0,0 +1,3 @@
|
|||
This file is autogenerated, but we've stopped checking such files into the
|
||||
repository to reduce the need for rebases. Please run hack/generate-docs.sh to
|
||||
populate this file.
|
|
@ -0,0 +1,3 @@
|
|||
This file is autogenerated, but we've stopped checking such files into the
|
||||
repository to reduce the need for rebases. Please run hack/generate-docs.sh to
|
||||
populate this file.
|
|
@ -0,0 +1,3 @@
|
|||
This file is autogenerated, but we've stopped checking such files into the
|
||||
repository to reduce the need for rebases. Please run hack/generate-docs.sh to
|
||||
populate this file.
|
|
@ -0,0 +1,3 @@
|
|||
This file is autogenerated, but we've stopped checking such files into the
|
||||
repository to reduce the need for rebases. Please run hack/generate-docs.sh to
|
||||
populate this file.
|
|
@ -0,0 +1,3 @@
|
|||
This file is autogenerated, but we've stopped checking such files into the
|
||||
repository to reduce the need for rebases. Please run hack/generate-docs.sh to
|
||||
populate this file.
|
|
@ -0,0 +1,3 @@
|
|||
This file is autogenerated, but we've stopped checking such files into the
|
||||
repository to reduce the need for rebases. Please run hack/generate-docs.sh to
|
||||
populate this file.
|
|
@ -0,0 +1,3 @@
|
|||
This file is autogenerated, but we've stopped checking such files into the
|
||||
repository to reduce the need for rebases. Please run hack/generate-docs.sh to
|
||||
populate this file.
|
|
@ -0,0 +1,3 @@
|
|||
This file is autogenerated, but we've stopped checking such files into the
|
||||
repository to reduce the need for rebases. Please run hack/generate-docs.sh to
|
||||
populate this file.
|
|
@ -0,0 +1,3 @@
|
|||
This file is autogenerated, but we've stopped checking such files into the
|
||||
repository to reduce the need for rebases. Please run hack/generate-docs.sh to
|
||||
populate this file.
|
|
@ -0,0 +1,3 @@
|
|||
This file is autogenerated, but we've stopped checking such files into the
|
||||
repository to reduce the need for rebases. Please run hack/generate-docs.sh to
|
||||
populate this file.
|
|
@ -0,0 +1,3 @@
|
|||
This file is autogenerated, but we've stopped checking such files into the
|
||||
repository to reduce the need for rebases. Please run hack/generate-docs.sh to
|
||||
populate this file.
|
|
@ -0,0 +1,3 @@
|
|||
This file is autogenerated, but we've stopped checking such files into the
|
||||
repository to reduce the need for rebases. Please run hack/generate-docs.sh to
|
||||
populate this file.
|
|
@ -0,0 +1,3 @@
|
|||
This file is autogenerated, but we've stopped checking such files into the
|
||||
repository to reduce the need for rebases. Please run hack/generate-docs.sh to
|
||||
populate this file.
|
Loading…
Reference in New Issue