karmada
                                
                                 karmada copied to clipboard
                                
                                    karmada copied to clipboard
                            
                            
                            
                        feature: add name length check for fedresourcequota
Signed-off-by: likakuli [email protected]
What type of PR is this? /kind feature
What this PR does / why we need it:
FedResourceQuota is a user-facing resource and its name is used in work's label. So the length should be no more than 63 characters like other resource. e.g. PropagationPolicy
Which issue(s) this PR fixes: Fixes #
Special notes for your reviewer:
Does this PR introduce a user-facing change?:
NONE
[APPROVALNOTIFIER] This PR is NOT APPROVED
This pull-request has been approved by:
To complete the pull request process, please assign kevin-wangzefeng after the PR has been reviewed.
You can assign the PR to them by writing /assign @kevin-wangzefeng in a comment when ready.
The full list of commands accepted by this bot can be found here.
Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment
I think it makes sense to add this validation. However, it may be not a bug fix but only a verification enhancement.
OK,let me update the kind.
This failing e2e case will be fixed by #2177
FedResourceQuota is a user-facing resource and its name is used in work's label.
I'm afraid this is the wrong decision that directly takes name as the label.
We already have lessons learned about that. We should use the hash value, just like what we did for ResourceBinding.
By the way, restricting the name length definitely a cheaper way, but we should avoid doing that as we don't know exactly the use case and should not make the assumption that the name length never exceeds 63.