Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🐛 make the clusteradm join output more clear #444

Merged
merged 1 commit into from
Jul 3, 2024

Conversation

skeeey
Copy link
Member

@skeeey skeeey commented Jun 25, 2024

Summary

Related issue(s)

Fixes #372

@skeeey
Copy link
Member Author

skeeey commented Jun 25, 2024

/assign @qiujian16

- apiGroups:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I do no think agent needs this clusterrole?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the auto approval feature is controlled by the clustermanager, when we use clusteradm join a cluster, we need read the clustermanager to see it if enable the auto approval feature, so I added this clusterrole for bootstrap token

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But it is mainly for clusteradm to know, not agent, right?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

right, it is mainly for clusteradm to know

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

for clusteradm join, it seems we only have the bootstrap token, right?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

or we give a clear messages instead of checking the auto approval feature? e.g.

Your managed cluster cluster1 has joined the Hub.

If the ManagedClusterAutoApproval feature is not enabled, Please log onto the hub ...

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes, I think this would be better.

@skeeey skeeey force-pushed the msg branch 2 times, most recently from 9bcaec8 to c6c32a9 Compare June 26, 2024 09:28
@skeeey skeeey changed the title 🐛 Only show joined msg when auto approval enabled 🐛 make the clusteradm join output more clear Jun 26, 2024
@@ -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)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

since ManagedClusterAutoApproval is disable by default, we might say
Please log onto the hub cluster and run the following command: at first and then say it is not needed when If the ManagedClusterAutoApproval feature is not enabled.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

updated

@qiujian16
Copy link
Member

/approve
/lgtm

@openshift-ci openshift-ci bot added the lgtm label Jun 28, 2024
Copy link

openshift-ci bot commented Jun 28, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: qiujian16, skeeey

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@skeeey skeeey closed this Jul 3, 2024
@skeeey skeeey reopened this Jul 3, 2024
@openshift-merge-bot openshift-merge-bot bot merged commit 50f18d1 into open-cluster-management-io:main Jul 3, 2024
12 of 13 checks passed
@skeeey skeeey deleted the msg branch July 3, 2024 03:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support join cluster with auto-approve
2 participants