-
Notifications
You must be signed in to change notification settings - Fork 374
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
Remove MemberClusterAnnounce if ClusterSet deleted #4026
Remove MemberClusterAnnounce if ClusterSet deleted #4026
Conversation
/test-multicluster-e2e |
Codecov Report
@@ Coverage Diff @@
## main #4026 +/- ##
==========================================
+ Coverage 64.34% 65.96% +1.62%
==========================================
Files 294 309 +15
Lines 43634 44125 +491
==========================================
+ Hits 28076 29107 +1031
+ Misses 13282 12693 -589
- Partials 2276 2325 +49
*This pull request uses carry forward flags. Click here to find out more.
|
0f5abfe
to
390dc13
Compare
/test-multicluster-e2e |
@@ -92,6 +92,9 @@ func (r *MemberClusterSetReconciler) Reconcile(ctx context.Context, req ctrl.Req | |||
} | |||
klog.InfoS("Received ClusterSet delete", "clusterset", req.NamespacedName) | |||
if r.remoteCommonArea != nil { | |||
if err := r.deleteMemberClusterAnnounce(ctx); err != nil { | |||
return ctrl.Result{}, err |
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.
I think you need to prepend context to the returned err (or log the failure with context here), otherwise the log by the caller wont indicate what fails.
e.g. fmt.Errorf("failed to delete MemberClusterAnnounce in the leader cluster: %v", err)
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.
Fixed
Add a step to ensure that member ClusterSet controller will clean up MemberClusterAnnounce in the leader cluster if the ClusterSet in the member is deleted. Signed-off-by: Lan Luo <[email protected]>
390dc13
to
3afba07
Compare
/test-multicluster-e2e |
/skip-all |
Add a step to ensure that member ClusterSet controller will
clean up MemberClusterAnnounce in the leader cluster if
the ClusterSet in the member is deleted.