-
Notifications
You must be signed in to change notification settings - Fork 176
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
Relax name length restriction for Secrets/ConfigMaps. #1494
Conversation
LGTM git commit -a --amend -s |
The Kubernetes documentation states that the name of these resources much be a DNS subdomain name, which it defines[1] as being up to 253 characters. Following the referenced RFC it does appear that the name should be further restricted to require the 253 characters be made up of multiple of multiple 63-character labels separated by dots. The Kubernetes[2] validation code does not apply this label restriction though, and will accept names longer than 63 characters. This commit adjusts the length limits to match. [1]: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#dns-subdomain-names [2]: https://github.com/kubernetes/apimachinery/blob/6b1428efc73348cc1c33935f3a39ab0f2f01d23d/pkg/util/validation/validation.go#L215 Signed-off-by: Kenny MacDermid <kenny@macdermid.ca>
e6756f7
to
b727916
Compare
Thanks @rhatdan! force-pushed. Took me a second to figure out what you meant as my commit was already signed with my gpg key. I'm not sure how the signed-of line helps, but it's there now. (Slight git aside, I wouldn't include the |
It looks like one of the configmaps tests is no longer failing |
/approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: KenMacD, rhatdan 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 |
@umohnani8 @ygalblum PTAL |
The code looks OK, but you'll need to adjust the tests to the new restriction |
changes LGTM |
The Kubernetes documentation states that the name of these resources much be a DNS subdomain name, which it defines[1] as being up to 253 characters. Following the referenced RFC it does appear that the name should be further restricted to require the 253 characters be made up of multiple of multiple 63-character labels separated by dots. The Kubernetes[2] validation code does not apply this label restriction though, and will accept names longer than 63 characters. This commit adjusts the length limits to match. [1]: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#dns-subdomain-names [2]: https://github.com/kubernetes/apimachinery/blob/6b1428efc73348cc1c33935f3a39ab0f2f01d23d/pkg/util/validation/validation.go#L215 Completes: containers#1494 Signed-off-by: Kenny MacDermid <kenny@macdermid.ca> Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
Thanks @KenMacD I updated your patch to fix the tests. |
The Kubernetes documentation states that the name of these resources much be a DNS subdomain name, which it defines[1] as being up to 253 characters. Following the referenced RFC it does appear that the name should be further restricted to require the 253 characters be made up of multiple of multiple 63-character labels separated by dots. The Kubernetes[2] validation code does not apply this label restriction though, and will accept names longer than 63 characters. This commit adjusts the length limits to match. [1]: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#dns-subdomain-names [2]: https://github.com/kubernetes/apimachinery/blob/6b1428efc73348cc1c33935f3a39ab0f2f01d23d/pkg/util/validation/validation.go#L215 Completes: containers#1494 Signed-off-by: Kenny MacDermid <kenny@macdermid.ca> Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
The Kubernetes documentation states that the name of these resources much be a DNS subdomain name, which it defines as being up to 253 characters.
Following the referenced RFC it does appear that the name should be further restricted to require the 253 characters be made up of multiple of multiple 63-character labels separated by dots. The Kubernetes validation code does not apply this label restriction though, and will accept names longer than 63 characters.
This commit adjusts the length limits to match.