-
Notifications
You must be signed in to change notification settings - Fork 917
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 validation on policy permanent ID #4964
Add validation on policy permanent ID #4964
Conversation
/assign @RainbowMango @XiShanYongYe-Chang |
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 #4964 +/- ##
==========================================
+ Coverage 53.32% 53.33% +0.01%
==========================================
Files 252 252
Lines 20485 20482 -3
==========================================
+ Hits 10923 10925 +2
+ Misses 8841 8835 -6
- Partials 721 722 +1
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
3b2d549
to
4e6faad
Compare
Yes, this is currently being fixed. |
4e6faad
to
2ff60d0
Compare
Signed-off-by: whitewindmills <[email protected]>
2ff60d0
to
b7678c9
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.
Thanks a lot~
/lgtm
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.
/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 |
Do we also need to add the permanentID validation for the RB/CRB and Work? @RainbowMango @whitewindmills |
I think it’s reasonable regardless of whether to add it or not cause they are usually not visible to users. In addition, I think it is more necessary to add the validation for resource templates. |
What behavior are you referring to? |
apiVersion: v1
kind: ConfigMap
metadata:
creationTimestamp: "2024-05-23T03:00:31Z"
annotations:
clusterpropagationpolicy.karmada.io/name: foo-cpp
labels:
clusterpropagationpolicy.karmada.io/name: foo-cpp
clusterpropagationpolicy.karmada.io/permanent-id: c105115c-1243-4a4c-189c-990936097gs8
name: foo
namespace: default
resourceVersion: "63274530"
uid: b205114b-3443-4b4d-a89c-410936097ed5 protect these labels and annotations from modification by users, but I haven't figured out how to do it yet. |
Do we need to consider whether it is a user-aware API when validating? |
What type of PR is this?
/kind feature
What this PR does / why we need it:
Add protection mechanism for the permanent ID, see #4949 (comment)
Which issue(s) this PR fixes:
Fixes #
Special notes for your reviewer:
Does this PR introduce a user-facing change?: