-
Notifications
You must be signed in to change notification settings - Fork 822
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
feature: moving Karmada resource key information from labels to annotations #4000
Comments
/assign |
should have a document for existing resources after #3899 is merged.
|
Due to the issue mentioned in #3899 (comment), in the context of backup and recovery, it cannot be guaranteed that the UID remains consistent during recovery. Therefore, we need a unique resource ID to indicate resource dependencies, which will be used as a label selector. Currently, two approaches are being explored:
So, we can directly call this library to generate resource IDs. @4125 @chaunceyjiang , what do you think? |
@whitewindmills too |
+1. I think this method is meaningful. However, we have introduced a feature at #4007, so do we need to deprecate this feature? |
I think we need to do it |
@wu0407 @whitewindmills any suggestions? |
After talking about this topic in the community meeting. Here is the conclusion:
So after the ID is added, we can use it as a label selector to find and operate the resources. To implement this fully, we need to do different things in different releases. Release v1.8.0
Release v1.9.0
Note |
/assign |
We have solved it, please refer to #4711 |
@XiShanYongYe-Chang: Closing this issue. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
What would you like to be added:
Now, Karmada puts the resource owner information into labels, which could cause the label value longer than 63 chars.
So first, let's figure out what's the current situation:
PropagationPolicy
max_len(name) = 63
max_len(namespace)=63
Deployment
max_len(name)=253
max_len(namespace)=63
After find the matched PP, there will be two labels:
ResourceBinding
max_len(name)=Deployment's name+kind > 253 (1)
max_len(namespace)=Deployment's namespace < 63
After matched, there will be two labels:
Work
max_len(name)=Deplyment's name + hash(namepsace-name-kind) > 253 (2)
max(namespace)=Deployment's namespace < 63
There will be one label:
Deployment in member clusters
max_len(name)=253
max_len(namesapce)=63
There will be following labels:
(1) It couldn't be longer than 253, there will be errors.
(2) It couldn't be longer than 253, there will be errors.
(3) It couldn't be longer than 63, there will be errors.
For (1)/(2), there are few possibilities of users using excessively long deployment names. We should provide documentation that indicates the maximum length for workload names.
To address (3), the solution is to transfer all relevant owner information to annotations and include a unique identifier label there(uid), which will be used for label selection during coding, like following:
The changes roadmap:
Why is this needed:
If users create a workload with a name longer than 63 characters, the workload may not be synchronized to member clusters because of the webhook validation.
/cc @RainbowMango
The text was updated successfully, but these errors were encountered: