-
Notifications
You must be signed in to change notification settings - Fork 909
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
fix: ClusterResourceBinding
scope in MutatingWebhookConfiguration
#5252
Conversation
Signed-off-by: Amir Alavi <amiralavi7@gmail.com>
Codecov ReportAll modified and coverable lines are covered by tests ✅
❗ Your organization needs to install the Codecov GitHub app to enable full functionality. Additional details and impacted files@@ Coverage Diff @@
## master #5252 +/- ##
==========================================
+ Coverage 28.24% 28.26% +0.02%
==========================================
Files 632 632
Lines 43732 43732
==========================================
+ Hits 12353 12363 +10
+ Misses 30476 30469 -7
+ Partials 903 900 -3
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
/retest |
Hi @a7i, thanks for your feedback. I'm sorry for the disruption to your business. This also reminds me that we do not have E2E capabilities to maintain related capabilities. Do you think we can design some E2E capabilities to maintain the logic? |
all good! we're happy that we can make small contributions to this project. Happy to explore this and submit a few e2e tests in a separate PR (so we can cover CRB and RB) |
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.
Thanks~
/lgtm
/approve
We also need to cherry-pick this patch to the previous branch.
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: XiShanYongYe-Chang 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 |
…k-of-#5252-upstream-release-1.10 Automated cherry pick of #5252: fix: `ClusterResourceBinding` scope in
What type of PR is this?
/kind bug
What this PR does / why we need it:
We've been having a lot of issues with karmada deleting cluster-level resources such as ClusterRole and ClusterRoleBinding.
After debugging, we realized that the label
clusterresourcebinding.karmada.io/permanent-id
was missing from those ClusterResourceBinding and that the webhook is responsible for populating that. Given that this was empty, all resource propagated to the member cluster also had an empty value for the id (i.e.clusterresourcebinding.karmada.io/permanent-id: ""
) which is then identified as orphaned work and is deleted in the cluster.This must have broke after the "63 char limit issue" because all of our CRBs prior to that release are fine and do not cause orphan work issues:
(note 79 days ago is good, but all recent ones are not)
Which issue(s) this PR fixes:
Fixes #
Special notes for your reviewer:
Does this PR introduce a user-facing change?: