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
Don't blame DNS spec on Kubernetes requirement for lower-case DNS labels. #39675
Don't blame DNS spec on Kubernetes requirement for lower-case DNS labels. #39675
Conversation
@k8s-bot bazel test this |
@k8s-bot unit test this |
@@ -88,7 +88,7 @@ func IsValidLabelValue(value string) []string { | |||
} | |||
|
|||
const dns1123LabelFmt string = "[a-z0-9]([-a-z0-9]*[a-z0-9])?" | |||
const dns1123LabelErrMsg string = "a valid DNS (RFC 1123) label must consist of lower case alphanumeric characters or '-', and must start and end with an alphanumeric character" | |||
const dns1123LabelErrMsg string = "a DNS label must consist of lower case alphanumeric characters or '-', and must start and end with an alphanumeric character" |
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.
the problem is that we have at least 2 errors that say "a DNS label". How about "a DNS-1123" and "DNS-1035" ?
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.
Good point. Fixed!
9d846db
to
49c4f3e
Compare
@k8s-bot bazel test this |
@k8s-bot unit test this |
Jenkins GCI GKE smoke e2e failed for commit 49c4f3e44b7d62baac786a9ed9af0dd13a00bc50. Full PR test history. The magic incantation to run this job again is 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. |
Jenkins GKE smoke e2e failed for commit 49c4f3e44b7d62baac786a9ed9af0dd13a00bc50. Full PR test history. The magic incantation to run this job again is 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. |
@k8s-bot test this |
Looks like you have more tests to fix up. |
@thockin there must be something wrong with the build as the tests that complain have been fixed in this PR. |
Example:
|
Jenkins Bazel Build failed for commit 49c4f3e44b7d62baac786a9ed9af0dd13a00bc50. Full PR test history. The magic incantation to run this job again is 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. |
Jenkins unit/integration failed for commit 49c4f3e44b7d62baac786a9ed9af0dd13a00bc50. Full PR test history. The magic incantation to run this job again is 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. |
could you be tripped up by staging/src/k8s.io/apimachinery/pkg/util/validation/validation.go ? |
49c4f3e
to
c897ed2
Compare
Seems I can't fix it
|
@deads2k you added |
The authoritative copy of A brief explanation. As we started splitting apart repos, they all wanted incompatible copies of |
@deads2k so this needs to be put on hold until |
Just remove your changes to |
Leave the change to |
c897ed2
to
3856d91
Compare
Thank you @deads2k. PTAL |
@k8s-bot verify test this |
Jenkins verification failed for commit 3856d91. Full PR test history. The magic incantation to run this job again is 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. |
@k8s-bot verify test this |
@k8s-bot test this [submit-queue is verifying that this PR is safe to merge] |
Automatic merge from submit-queue |
Otherwise pod spec is invalid and scans for long images will not run https://bugzilla.redhat.com/show_bug.cgi?id=1751267 Expanded comments to clarify lowercase requirement is by Kubernetes not the DNS RFC (kubernetes/kubernetes#39675). The RFC also says: > Host software MUST handle host names of up to 63 characters and > SHOULD handle host names of up to 255 characters so a bit ambiguous what's "valid DNS label" means but anyway Kubernetes chose 63 (some history on kubernetes/kubernetes#4825)
Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1751267 Setting "hostname" was an enhancement in ManageIQ#248 to improve image names but it introduced a regression: Pod spec could be invalid for long image names, causing scanning to not run at all. (Possibly also for weird characters in name, not sure if realistic but made code more robust to that too.) Expanded comments to clarify lowercase requirement is by Kubernetes not the DNS RFC (kubernetes/kubernetes#39675). The RFC also says: > Host software MUST handle host names of up to 63 characters and > SHOULD handle host names of up to 255 characters so a bit ambiguous what's "valid DNS label" means but anyway Kubernetes chose 63 (some history on kubernetes/kubernetes#4825)
Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1751267 Setting "hostname" was an enhancement in ManageIQ#248 to improve image names but it introduced a regression: Pod spec could be invalid for long image names, causing scanning to not run at all. (Possibly also for weird characters in name, not sure if realistic but made code more robust to that too.) Expanded comments to clarify lowercase requirement is by Kubernetes not the DNS RFC (kubernetes/kubernetes#39675). The RFC also says: > Host software MUST handle host names of up to 63 characters and > SHOULD handle host names of up to 255 characters so a bit ambiguous what's "valid DNS label" means but anyway Kubernetes chose 63 (some history on kubernetes/kubernetes#4825)
Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1751267 Setting "hostname" was an enhancement in ManageIQ#248 to improve image names but it introduced a regression: Pod spec could be invalid for long image names, causing scanning to not run at all. (Possibly also for weird characters in name, not sure if realistic but made code more robust to that too.) Expanded comments to clarify lowercase requirement is by Kubernetes not the DNS RFC (kubernetes/kubernetes#39675). The RFC also says: > Host software MUST handle host names of up to 63 characters and > SHOULD handle host names of up to 255 characters so a bit ambiguous what's "valid DNS label" means but anyway Kubernetes chose 63 (some history on kubernetes/kubernetes#4825)
What this PR does / why we need it: #39635 was rejected because it wasn't clear to the author (me) that lower-case DNS labels are in fact a Kubernetes requirement rather than from the DNS RFC 1035 or/and DNS RFC 1123.
Special notes for your reviewer: @thockin this is a first pass to make the error messages clearer about the fact that DNS specs are not to blame.