-
Notifications
You must be signed in to change notification settings - Fork 914
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: fix resource(work/resource in member clusters) conflicting between PP and MCS. #4414
Conversation
2eef3b0
to
f0d8f88
Compare
Codecov ReportAttention:
❗ Your organization needs to install the Codecov GitHub app to enable full functionality. Additional details and impacted files@@ Coverage Diff @@
## master #4414 +/- ##
==========================================
- Coverage 51.92% 51.89% -0.03%
==========================================
Files 243 243
Lines 24150 24162 +12
==========================================
- Hits 12539 12538 -1
- Misses 10930 10943 +13
Partials 681 681
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
cf63989
to
63c22d2
Compare
84d87d8
to
ea011b1
Compare
// EventReasonConfigurationRedundant indicates that MultiClusterService configuration redundant. | ||
EventReasonConfigurationRedundant = "ConfigurationRedundant" |
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.
consider another name.
@@ -108,7 +108,8 @@ func (s *Scheduler) resourceBindingEventFilter(obj interface{}) bool { | |||
} | |||
|
|||
return util.GetLabelValue(accessor.GetLabels(), policyv1alpha1.PropagationPolicyNameLabel) != "" || | |||
util.GetLabelValue(accessor.GetLabels(), policyv1alpha1.ClusterPropagationPolicyLabel) != "" | |||
util.GetLabelValue(accessor.GetLabels(), policyv1alpha1.ClusterPropagationPolicyLabel) != "" || | |||
util.GetLabelValue(accessor.GetLabels(), workv1alpha2.BindingManagedByLabel) != "" |
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.
TODO: consider a new label name.
pkg/controllers/multiclusterservice/endpointslice_dispatch_controller.go
Outdated
Show resolved
Hide resolved
6f3632f
to
cefd90e
Compare
Signed-off-by: jwcesign <jwcesign@gmail.com>
cefd90e
to
467e666
Compare
467e666
to
e77fe55
Compare
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 api-change
/kind feature
What this PR does / why we need it:
Previously, we directly generated service work, but this led to conflicts with work created based on RB/PP. To resolve this issue, we introduced a new naming style for the work.
To prevent these conflicts, we propose a solution: MCS will generate RB from the service and if there's an existing RB generated by PP, MCS will assume control over it. This way, no conflict arises. Additionally, once a resource is matched by MCS, the detector should ignore it.
Looking ahead, other CRs similar to MCS(like a scenario-related PP) may emerge in future scenarios. They should adhere to this approach to avoid potential conflicts.
Which issue(s) this PR fixes:
Fixes #none
Special notes for your reviewer:
none
Does this PR introduce a user-facing change?: