Skip to content

Commit 3173da5

Browse files
committed
enhance the output of commands
Signed-off-by: Mike Ng <[email protected]>
1 parent 9896349 commit 3173da5

File tree

3 files changed

+8
-4
lines changed

3 files changed

+8
-4
lines changed

pkg/cmd/accept/exec.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,7 @@ func (o *Options) updateManagedCluster(clusterClient *clusterclientset.Clientset
183183
return false, err
184184
}
185185
if mc.Spec.HubAcceptsClient {
186-
fmt.Printf("httpAcceptsClient already set for cluster %s\n", clusterName)
186+
fmt.Printf("hubAcceptsClient already set for managed cluster %s\n", clusterName)
187187
return true, nil
188188
}
189189
if o.ClusteradmFlags.DryRun {
@@ -195,7 +195,7 @@ func (o *Options) updateManagedCluster(clusterClient *clusterclientset.Clientset
195195
if err != nil {
196196
return false, err
197197
}
198-
fmt.Printf("set httpAcceptsClient to true for cluster %s\n", clusterName)
198+
fmt.Printf("set hubAcceptsClient to true for managed cluster %s\n", clusterName)
199199
}
200200
return true, nil
201201
}

pkg/cmd/init/exec.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,10 @@ func (o *Options) run() error {
133133
return nil
134134
}
135135

136-
fmt.Printf("please log on spoke and run:\n%s join --hub-token %s --hub-apiserver %s --cluster-name <cluster_name>\n",
136+
fmt.Printf("The multicluster hub control plane has been initialized successfully!\n\n"+
137+
"You can now register cluster(s) to the hub control plane. Log onto those cluster(s) and run the following command:\n\n"+
138+
" %s join --hub-token %s --hub-apiserver %s --cluster-name <cluster_name>\n\n"+
139+
"Replace <cluster_name> with a cluster name of your choice. For example, cluster1.\n\n",
137140
helpers.GetExampleHeader(),
138141
token,
139142
restConfig.Host,

pkg/cmd/join/exec.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,8 @@ func (o *Options) run() error {
110110
return err
111111
}
112112
output = append(output, out...)
113-
fmt.Printf("please wait a few minutes then log on to hub and accept by running:\n%s accept --clusters %s\n", helpers.GetExampleHeader(), o.values.ClusterName)
113+
fmt.Printf("Deploying klusterlet agent. Please wait a few minutes then log onto the hub cluster and run the following command:\n\n"+
114+
" %s accept --clusters %s\n\n", helpers.GetExampleHeader(), o.values.ClusterName)
114115

115116
return apply.WriteOutput(o.outputFile, output)
116117

0 commit comments

Comments
 (0)