From 9bcaec84aa0c8b187c26c273b60e9a3fd0af9b1d Mon Sep 17 00:00:00 2001 From: Wei Liu Date: Tue, 25 Jun 2024 14:14:33 +0800 Subject: [PATCH] make the clusteradm join output msg more clear Signed-off-by: Wei Liu --- pkg/cmd/init/scenario/init/bootstrap_cluster_role.yaml | 3 +-- pkg/cmd/join/exec.go | 3 ++- test/e2e/clusteradm/scenario/init/bootstrap_cluster_role.yaml | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/pkg/cmd/init/scenario/init/bootstrap_cluster_role.yaml b/pkg/cmd/init/scenario/init/bootstrap_cluster_role.yaml index 9fc60076e..2e7a55dd9 100644 --- a/pkg/cmd/init/scenario/init/bootstrap_cluster_role.yaml +++ b/pkg/cmd/init/scenario/init/bootstrap_cluster_role.yaml @@ -33,5 +33,4 @@ rules: resources: - "managedclustersets/join" verbs: - - "create" - \ No newline at end of file + - "create" \ No newline at end of file diff --git a/pkg/cmd/join/exec.go b/pkg/cmd/join/exec.go index ceedbf679..f7bd5d0f4 100644 --- a/pkg/cmd/join/exec.go +++ b/pkg/cmd/join/exec.go @@ -355,7 +355,8 @@ func (o *Options) run() error { } } - fmt.Fprintf(o.Streams.Out, "Please log onto the hub cluster and run the following command:\n\n"+ + fmt.Fprintf(o.Streams.Out, "\nYour managed cluster %s has joined the Hub.\n", o.values.ClusterName) + fmt.Fprintf(o.Streams.Out, "If the ManagedClusterAutoApproval feature is not enabled, Please log onto the hub cluster and run the following command:\n\n"+ " %s accept --clusters %s\n\n", helpers.GetExampleHeader(), o.values.ClusterName) return nil diff --git a/test/e2e/clusteradm/scenario/init/bootstrap_cluster_role.yaml b/test/e2e/clusteradm/scenario/init/bootstrap_cluster_role.yaml index 563bd755b..2e7a55dd9 100644 --- a/test/e2e/clusteradm/scenario/init/bootstrap_cluster_role.yaml +++ b/test/e2e/clusteradm/scenario/init/bootstrap_cluster_role.yaml @@ -33,4 +33,4 @@ rules: resources: - "managedclustersets/join" verbs: - - "create" + - "create" \ No newline at end of file