diff --git a/cmd/kubeadm/app/cmd/phases/BUILD b/cmd/kubeadm/app/cmd/phases/BUILD index fd843dbbf76..dd32efe2a89 100644 --- a/cmd/kubeadm/app/cmd/phases/BUILD +++ b/cmd/kubeadm/app/cmd/phases/BUILD @@ -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", diff --git a/cmd/kubeadm/app/cmd/phases/certs.go b/cmd/kubeadm/app/cmd/phases/certs.go index a9d83a59e47..96455c99b06 100644 --- a/cmd/kubeadm/app/cmd/phases/certs.go +++ b/cmd/kubeadm/app/cmd/phases/certs.go @@ -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) diff --git a/cmd/kubeadm/app/cmd/phases/certs/renew.go b/cmd/kubeadm/app/cmd/phases/certs/renew.go index 9f56ef45f10..a13fce0ad87 100644 --- a/cmd/kubeadm/app/cmd/phases/certs/renew.go +++ b/cmd/kubeadm/app/cmd/phases/certs/renew.go @@ -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 diff --git a/docs/.generated_docs b/docs/.generated_docs index d6662f5c58f..4bdfd8d9dbc 100644 --- a/docs/.generated_docs +++ b/docs/.generated_docs @@ -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 diff --git a/docs/admin/kubeadm_alpha_phase_certs_renew.md b/docs/admin/kubeadm_alpha_phase_certs_renew.md new file mode 100644 index 00000000000..b6fd7a0f989 --- /dev/null +++ b/docs/admin/kubeadm_alpha_phase_certs_renew.md @@ -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. diff --git a/docs/admin/kubeadm_alpha_phase_certs_renew_all.md b/docs/admin/kubeadm_alpha_phase_certs_renew_all.md new file mode 100644 index 00000000000..b6fd7a0f989 --- /dev/null +++ b/docs/admin/kubeadm_alpha_phase_certs_renew_all.md @@ -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. diff --git a/docs/admin/kubeadm_alpha_phase_certs_renew_apiserver-etcd-client.md b/docs/admin/kubeadm_alpha_phase_certs_renew_apiserver-etcd-client.md new file mode 100644 index 00000000000..b6fd7a0f989 --- /dev/null +++ b/docs/admin/kubeadm_alpha_phase_certs_renew_apiserver-etcd-client.md @@ -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. diff --git a/docs/admin/kubeadm_alpha_phase_certs_renew_apiserver-kubelet-client.md b/docs/admin/kubeadm_alpha_phase_certs_renew_apiserver-kubelet-client.md new file mode 100644 index 00000000000..b6fd7a0f989 --- /dev/null +++ b/docs/admin/kubeadm_alpha_phase_certs_renew_apiserver-kubelet-client.md @@ -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. diff --git a/docs/admin/kubeadm_alpha_phase_certs_renew_apiserver.md b/docs/admin/kubeadm_alpha_phase_certs_renew_apiserver.md new file mode 100644 index 00000000000..b6fd7a0f989 --- /dev/null +++ b/docs/admin/kubeadm_alpha_phase_certs_renew_apiserver.md @@ -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. diff --git a/docs/admin/kubeadm_alpha_phase_certs_renew_etcd-healthcheck-client.md b/docs/admin/kubeadm_alpha_phase_certs_renew_etcd-healthcheck-client.md new file mode 100644 index 00000000000..b6fd7a0f989 --- /dev/null +++ b/docs/admin/kubeadm_alpha_phase_certs_renew_etcd-healthcheck-client.md @@ -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. diff --git a/docs/admin/kubeadm_alpha_phase_certs_renew_etcd-peer.md b/docs/admin/kubeadm_alpha_phase_certs_renew_etcd-peer.md new file mode 100644 index 00000000000..b6fd7a0f989 --- /dev/null +++ b/docs/admin/kubeadm_alpha_phase_certs_renew_etcd-peer.md @@ -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. diff --git a/docs/admin/kubeadm_alpha_phase_certs_renew_etcd-server.md b/docs/admin/kubeadm_alpha_phase_certs_renew_etcd-server.md new file mode 100644 index 00000000000..b6fd7a0f989 --- /dev/null +++ b/docs/admin/kubeadm_alpha_phase_certs_renew_etcd-server.md @@ -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. diff --git a/docs/admin/kubeadm_alpha_phase_certs_renew_front-proxy-client.md b/docs/admin/kubeadm_alpha_phase_certs_renew_front-proxy-client.md new file mode 100644 index 00000000000..b6fd7a0f989 --- /dev/null +++ b/docs/admin/kubeadm_alpha_phase_certs_renew_front-proxy-client.md @@ -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. diff --git a/docs/man/man1/kubeadm-alpha-phase-certs-renew-all.1 b/docs/man/man1/kubeadm-alpha-phase-certs-renew-all.1 new file mode 100644 index 00000000000..b6fd7a0f989 --- /dev/null +++ b/docs/man/man1/kubeadm-alpha-phase-certs-renew-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. diff --git a/docs/man/man1/kubeadm-alpha-phase-certs-renew-apiserver-etcd-client.1 b/docs/man/man1/kubeadm-alpha-phase-certs-renew-apiserver-etcd-client.1 new file mode 100644 index 00000000000..b6fd7a0f989 --- /dev/null +++ b/docs/man/man1/kubeadm-alpha-phase-certs-renew-apiserver-etcd-client.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. diff --git a/docs/man/man1/kubeadm-alpha-phase-certs-renew-apiserver-kubelet-client.1 b/docs/man/man1/kubeadm-alpha-phase-certs-renew-apiserver-kubelet-client.1 new file mode 100644 index 00000000000..b6fd7a0f989 --- /dev/null +++ b/docs/man/man1/kubeadm-alpha-phase-certs-renew-apiserver-kubelet-client.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. diff --git a/docs/man/man1/kubeadm-alpha-phase-certs-renew-apiserver.1 b/docs/man/man1/kubeadm-alpha-phase-certs-renew-apiserver.1 new file mode 100644 index 00000000000..b6fd7a0f989 --- /dev/null +++ b/docs/man/man1/kubeadm-alpha-phase-certs-renew-apiserver.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. diff --git a/docs/man/man1/kubeadm-alpha-phase-certs-renew-etcd-healthcheck-client.1 b/docs/man/man1/kubeadm-alpha-phase-certs-renew-etcd-healthcheck-client.1 new file mode 100644 index 00000000000..b6fd7a0f989 --- /dev/null +++ b/docs/man/man1/kubeadm-alpha-phase-certs-renew-etcd-healthcheck-client.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. diff --git a/docs/man/man1/kubeadm-alpha-phase-certs-renew-etcd-peer.1 b/docs/man/man1/kubeadm-alpha-phase-certs-renew-etcd-peer.1 new file mode 100644 index 00000000000..b6fd7a0f989 --- /dev/null +++ b/docs/man/man1/kubeadm-alpha-phase-certs-renew-etcd-peer.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. diff --git a/docs/man/man1/kubeadm-alpha-phase-certs-renew-etcd-server.1 b/docs/man/man1/kubeadm-alpha-phase-certs-renew-etcd-server.1 new file mode 100644 index 00000000000..b6fd7a0f989 --- /dev/null +++ b/docs/man/man1/kubeadm-alpha-phase-certs-renew-etcd-server.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. diff --git a/docs/man/man1/kubeadm-alpha-phase-certs-renew-front-proxy-client.1 b/docs/man/man1/kubeadm-alpha-phase-certs-renew-front-proxy-client.1 new file mode 100644 index 00000000000..b6fd7a0f989 --- /dev/null +++ b/docs/man/man1/kubeadm-alpha-phase-certs-renew-front-proxy-client.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. diff --git a/docs/man/man1/kubeadm-alpha-phase-certs-renew.1 b/docs/man/man1/kubeadm-alpha-phase-certs-renew.1 new file mode 100644 index 00000000000..b6fd7a0f989 --- /dev/null +++ b/docs/man/man1/kubeadm-alpha-phase-certs-renew.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.