-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
🐛 Align CRD version validation with apiextensions #3742
Conversation
|
Welcome @robzienert! |
Hi @robzienert. Thanks for your PR. I'm waiting for a kubernetes-sigs member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. 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. |
@@ -60,8 +53,9 @@ func (gvk GVK) Validate() error { | |||
if gvk.Version == "" { | |||
return fmt.Errorf(versionRequired) | |||
} | |||
if !versionRegex.MatchString(gvk.Version) { | |||
return fmt.Errorf("Version must match %s (was %s)", versionPattern, gvk.Version) | |||
if err := validation.IsDNS1035Label(gvk.Version); err != nil { |
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.
Could you confirm if that is the right validation done by k8s?
@erikgb @varshaprasad96, @everettraven could you lend a hand with this review?
That would be appreciate a lot
REALLY THANK YOU
/ok-to-test |
/retest |
Was that |
Hi @robzienert Really thank you for your contribution 🥇 For us to get this merged, we need to validate/ensure (add here a link for the source code, i.e.) that it is the right validation for versions. I will need to take some time to check, but if you are able to do this check and just add in the description the info, then I am OK to approve this one. |
Is the link in the initial description not what you're looking for? Happy to dig around if not, but want to verify. |
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
/approved
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: camilamacedo86, robzienert 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 |
@robzienert: The following tests failed, say
Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR. 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. I understand the commands that are listed here. |
Fixes #3739 where the existing CRD version name validation is more restrictive than Kubernetes itself. This aligns the validation with apiextensions CRD version name validation.