-
Notifications
You must be signed in to change notification settings - Fork 1.4k
⚠️ Add MaxLength & MinLength markers #11949
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 MaxLength & MinLength markers #11949
Conversation
I'll look into this. Seems like a limitation in controller-gen |
220c291
to
6ffe3ba
Compare
/hold cancel |
6ffe3ba
to
e340ae4
Compare
/test pull-cluster-api-e2e-main |
/assign @JoelSpeed @fabriziopandini @chrischdi Should be ready for review |
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.
ClusterName is included in several places, I wasn't sure if there's some restriction on this, but wouldn't a cluster name be limited by the CustomResource storage which limits names to DNS 1123 subdomain standards, and therefore 253 chars? Does CAPI have its own limit imposed somewhere?
controlplane/kubeadm/api/v1beta1/kubeadm_control_plane_types.go
Outdated
Show resolved
Hide resolved
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.
@sbueringer thanks for starting this work!
first pass
Yes it has. This already enforces max length 63 today: cluster-api/internal/webhooks/cluster.go Line 201 in 7720a94
(The cluster name is used in many places as label value) |
@JoelSpeed @fabriziopandini Pushed first round of fixes & answered on some comments. |
d51e190
to
e1ffc17
Compare
/test pull-cluster-api-e2e-main |
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.
Overall lgtm from my side
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.
Also LGTM pending the IP address/CIDR length conversation
Pushed a commit with fixes. I'll do another round for MinLength (after some experiments) + probably I'll review all markers myself one last time (also responded above on the remaining conversations) |
Still looking into MinLength |
570e54f
to
08fcee6
Compare
/test pull-cluster-api-e2e-main |
@fabriziopandini @JoelSpeed @chrischdi This is ready for a final review :) I would probably merge after the first 1-2 lgtms/approves and address potential additional findings in a follow-up as I want to unblock #11943 so we have a chance to get that one in as well before the code freeze |
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
LGTM label has been added. Git tree hash: 5505ded1b8bf8aac9e475b124eb6f55e18f72a16
|
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.
Two thoughts, but okay with all values :-)
/lgtm |
/test pull-cluster-api-e2e-main |
/assign @fabriziopandini @chrischdi |
/lgtm |
LGTM label has been added. Git tree hash: 0e5676e5f5b6a90983e189f5be6f5aca6a37b198
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: fabriziopandini 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 |
* Add MaxLength markers to API fields Signed-off-by: Stefan Büringer [email protected] * Fix review findings * Fix review findings * Fix review findings * regen * Fix review findings * Fix review findings --------- Signed-off-by: Stefan Büringer [email protected]
Signed-off-by: Stefan Büringer [email protected]
What this PR does / why we need it:
Which issue(s) this PR fixes (optional, in
fixes #<issue number>(, fixes #<issue_number>, ...)
format, will close the issue(s) when PR gets merged):Part of #11834