-
Notifications
You must be signed in to change notification settings - Fork 387
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
Add a ClusterSet deletion webhook for the leader cluster #5475
Add a ClusterSet deletion webhook for the leader cluster #5475
Conversation
f6ad0c3
to
20a4ad7
Compare
/test-multicluster-e2e |
In commit message MemberClusterResource -> MemberClusterAnnounce |
@@ -63,6 +63,13 @@ func runMember(o *Options) error { | |||
Client: mgr.GetClient(), | |||
namespace: env.GetPodNamespace()}}) | |||
|
|||
hookServer.Register("/validate-multicluster-crd-antrea-io-v1alpha2-clusterset", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Question - we also need to register the handler for a member cluster?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, this ClusterSet webhook was registered in controller.go before because there is no difference for the creation/update validation webhook in both leader and member clusters. But now, the deletion webhook is only required for the leader, so I moved this to the leader.go and member.go to get the role
info. For the member cluster, it's no-ops for deletion event.
Add a ClusterSet deletion webhook to fail the ClusterSet deletion request in the leader cluster when any MemberClusterAnnounce exists. Signed-off-by: Lan Luo <[email protected]>
20a4ad7
to
74aebe8
Compare
/test-multicluster-e2e |
/skip-all |
Add a ClusterSet deletion webhook to fail the ClusterSet deletion request
in the leader cluster when any MemberClusterAnnounce exists.