Unverified Commit c6c88f1b authored by k8s-ci-robot's avatar k8s-ci-robot Committed by GitHub

Merge pull request #70666 from neolit123/phase-fix-hidden

kubeadm: make sure that commands are not added for hidden phases
parents 710bfb44 4a098980
...@@ -301,6 +301,11 @@ func (e *Runner) BindToCommand(cmd *cobra.Command) { ...@@ -301,6 +301,11 @@ func (e *Runner) BindToCommand(cmd *cobra.Command) {
// generate all the nested subcommands for invoking single phases // generate all the nested subcommands for invoking single phases
subcommands := map[string]*cobra.Command{} subcommands := map[string]*cobra.Command{}
e.visitAll(func(p *phaseRunner) error { e.visitAll(func(p *phaseRunner) error {
// skip hidden phases
if p.Hidden {
return nil
}
// creates nested phase subcommand // creates nested phase subcommand
var phaseCmd = &cobra.Command{ var phaseCmd = &cobra.Command{
Use: strings.ToLower(p.Name), Use: strings.ToLower(p.Name),
......
...@@ -80,7 +80,6 @@ docs/admin/kubeadm_init_phase_kubeconfig_kubelet.md ...@@ -80,7 +80,6 @@ docs/admin/kubeadm_init_phase_kubeconfig_kubelet.md
docs/admin/kubeadm_init_phase_kubeconfig_scheduler.md docs/admin/kubeadm_init_phase_kubeconfig_scheduler.md
docs/admin/kubeadm_init_phase_kubelet-start.md docs/admin/kubeadm_init_phase_kubelet-start.md
docs/admin/kubeadm_init_phase_preflight.md docs/admin/kubeadm_init_phase_preflight.md
docs/admin/kubeadm_init_phase_wait-control-plane.md
docs/admin/kubeadm_join.md docs/admin/kubeadm_join.md
docs/admin/kubeadm_reset.md docs/admin/kubeadm_reset.md
docs/admin/kubeadm_token.md docs/admin/kubeadm_token.md
...@@ -176,7 +175,6 @@ docs/man/man1/kubeadm-init-phase-kubeconfig-scheduler.1 ...@@ -176,7 +175,6 @@ docs/man/man1/kubeadm-init-phase-kubeconfig-scheduler.1
docs/man/man1/kubeadm-init-phase-kubeconfig.1 docs/man/man1/kubeadm-init-phase-kubeconfig.1
docs/man/man1/kubeadm-init-phase-kubelet-start.1 docs/man/man1/kubeadm-init-phase-kubelet-start.1
docs/man/man1/kubeadm-init-phase-preflight.1 docs/man/man1/kubeadm-init-phase-preflight.1
docs/man/man1/kubeadm-init-phase-wait-control-plane.1
docs/man/man1/kubeadm-init-phase.1 docs/man/man1/kubeadm-init-phase.1
docs/man/man1/kubeadm-init.1 docs/man/man1/kubeadm-init.1
docs/man/man1/kubeadm-join.1 docs/man/man1/kubeadm-join.1
......
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.
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.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment