Skip to content
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 request: RFC 1123 and RFC 1035 #216

Open
yinchi opened this issue Sep 17, 2024 · 0 comments
Open

Feature request: RFC 1123 and RFC 1035 #216

yinchi opened this issue Sep 17, 2024 · 0 comments

Comments

@yinchi
Copy link

yinchi commented Sep 17, 2024

The RFCs are defined here: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/

This looks like a string type with a re.fullmatch Validator. For example, I think the regex string for an RFC 1035 label should be:

[a-z][0-9a-z-]{0,61}[0-9a-z]|[a-z]

The part before the | matches cases with 2 to 63 letters total, while the final [a-z] supplies the single-letter case. Similarly, an RFC 1123 Label would be

[0-9a-z][0-9a-z-]{0,61}[0-9a-z]|[0-9a-z]

I've entered these into https://regex101.com/ and it LGTM.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant