-
Notifications
You must be signed in to change notification settings - Fork 919
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
feat: sync mcs work when cluster joined or unjoin #4360
Conversation
Codecov ReportAttention:
❗ Your organization needs to install the Codecov GitHub app to enable full functionality. Additional details and impacted files@@ Coverage Diff @@
## master #4360 +/- ##
==========================================
+ Coverage 51.78% 51.88% +0.09%
==========================================
Files 243 243
Lines 24112 24114 +2
==========================================
+ Hits 12487 12511 +24
+ Misses 10944 10921 -23
- Partials 681 682 +1
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
2bdfca4
to
b21bc54
Compare
I've made some changes: jwcesign@54312e0 Please review and incorporate any appropriate adjustments. |
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.
Other lgtm
…sponding cluster execution namespace Signed-off-by: HongCen <zhouhongcen1@huawei.com>
lgtm |
@@ -460,6 +474,47 @@ func (c *MCSController) SetupWithManager(mgr controllerruntime.Manager) error { | |||
return controllerruntime.NewControllerManagedBy(mgr). | |||
For(&networkingv1alpha1.MultiClusterService{}, builder.WithPredicates(mcsPredicateFunc)). | |||
Watches(&corev1.Service{}, handler.EnqueueRequestsFromMapFunc(svcMapFunc), builder.WithPredicates(svcPredicateFunc)). | |||
Watches(&clusterv1alpha1.Cluster{}, handler.EnqueueRequestsFromMapFunc(c.clusterMapFunc())). |
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.
@jwcesign
Do we need to add an event filter?
Note that each cluster change would lead to list of all MultiClusterService in clusterMapFunc().
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.
We can only accept changes to the cluster status condition.
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.
/lgtm
/approve
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: RainbowMango 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 |
What type of PR is this?
/kind feature
What this PR does / why we need it:
Referring to #4287
Which issue(s) this PR fixes:
Part of #4292
Special notes for your reviewer:
none
Does this PR introduce a user-facing change?: