Skip to content

Instantly share code, notes, and snippets.

@jwmatthews
Last active August 5, 2016 17:36
Show Gist options
  • Save jwmatthews/8c2b573b4323d6ba15c6704f5b4e2630 to your computer and use it in GitHub Desktop.
Save jwmatthews/8c2b573b4323d6ba15c6704f5b4e2630 to your computer and use it in GitHub Desktop.
BZ:
https://bugzilla.redhat.com/show_bug.cgi?id=1364533#c0
Error seen:
stderr: The Route "hello-openshift" is invalid.
spec.host: Invalid value: "hello-openshift.pkpcpGALng.example.com": host must conform to DNS 952 subdomain conventions
Traced it down to the use of the uppercase is violating a check.
OpenShift code:
https://github.com/openshift/origin/blob/master/pkg/route/api/validation/validation.go#L30
Validation is from Kubernetes:
Ends up using a regexp:
https://github.com/kubernetes/kubernetes/blob/master/pkg/util/validation/validation.go#L124
const dns1035LabelFmt string = "[a-z]([-a-z0-9]*[a-z0-9])?"
Looking at RFC-952
https://tools.ietf.org/html/rfc952
" No blank or space characters are permitted as part of a
name. No distinction is made between upper and lower case. The first
character must be an alpha character. "
We believe the regexp in kubernetes should allow uppercase characters.
After reviewing this with team members concluded that it is customary to create actual host records as lowercase.
Lookups are case insensitve, but since k8bs is creating a record for a route, makes sense they are enforcing a lowercase.
In terms of QCI, we will downcase the string and pass in.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment