From ef3380b42d00787ff9f93233f9c8f19d5b6bb9df Mon Sep 17 00:00:00 2001 From: "Timothy St. Clair" Date: Tue, 13 Nov 2018 16:11:58 -0600 Subject: [PATCH] Fixup language on help message to denote phases Signed-off-by: Timothy St. Clair --- cmd/kubeadm/app/cmd/phases/bootstraptoken.go | 7 ++++--- cmd/kubeadm/app/cmd/phases/workflow/runner.go | 2 +- cmd/kubeadm/app/cmd/phases/workflow/runner_test.go | 2 +- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/cmd/kubeadm/app/cmd/phases/bootstraptoken.go b/cmd/kubeadm/app/cmd/phases/bootstraptoken.go index 536b8d68c3f..d17fe3d1f3f 100644 --- a/cmd/kubeadm/app/cmd/phases/bootstraptoken.go +++ b/cmd/kubeadm/app/cmd/phases/bootstraptoken.go @@ -35,7 +35,7 @@ import ( var ( bootstrapTokenLongDesc = normalizer.LongDesc(` Bootstrap tokens are used for establishing bidirectional trust between a node joining - the cluster and a the master node. + the cluster and a the control-plane node. This command makes all the configurations required to make bootstrap tokens works and then creates an initial token. @@ -61,8 +61,9 @@ func NewBootstrapTokenPhase() workflow.Phase { return workflow.Phase{ Name: "bootstrap-token", Aliases: []string{"bootstraptoken"}, - Short: bootstrapTokenLongDesc, - Long: bootstrapTokenExamples, + Short: "Generates bootstrap tokens used to join a node to a cluster", + Example: bootstrapTokenExamples, + Long: bootstrapTokenLongDesc, CmdFlags: []string{ options.CfgPath, options.KubeconfigDir, diff --git a/cmd/kubeadm/app/cmd/phases/workflow/runner.go b/cmd/kubeadm/app/cmd/phases/workflow/runner.go index 7d3f2e8de9c..7bf8df24338 100644 --- a/cmd/kubeadm/app/cmd/phases/workflow/runner.go +++ b/cmd/kubeadm/app/cmd/phases/workflow/runner.go @@ -250,7 +250,7 @@ func (e *Runner) Help(cmdUse string) string { // prints the list of phases indented by level and formatted using the maxlength // the list is enclosed in a mardown code block for ensuring better readability in the public web site - line := fmt.Sprintf("The %q command executes the following internal workflow:\n", cmdUse) + line := fmt.Sprintf("The %q command executes the following phases:\n", cmdUse) line += "```\n" offset := 2 e.visitAll(func(p *phaseRunner) error { diff --git a/cmd/kubeadm/app/cmd/phases/workflow/runner_test.go b/cmd/kubeadm/app/cmd/phases/workflow/runner_test.go index b303e7d26b5..fe5184417d8 100644 --- a/cmd/kubeadm/app/cmd/phases/workflow/runner_test.go +++ b/cmd/kubeadm/app/cmd/phases/workflow/runner_test.go @@ -269,7 +269,7 @@ func TestHelp(t *testing.T) { }, } - expected := "The \"myCommand\" command executes the following internal workflow:\n" + + expected := "The \"myCommand\" command executes the following phases:\n" + "```\n" + "foo long description for foo ...\n" + " /bar long description for bar ...\n" +