Bug Enhance host name validation - annotation
@@ -282,3 +282,24 @@ const (
// Note that this will not match acme.test only *.acme.test
WildcardPolicySubdomain WildcardPolicyType = "Subdomain"
)
+
+// Route Annotations
+const (
+ // AllowNonDNSCompliantHostAnnotation indicates that the host name in a route
+ // configuration is not required to follow strict DNS compliance.
+ // Unless the annotation is set to true, the route host name must have
+ // at least two labels, with each label no more than 63 characters from the set of
+ // alphanumeric characters, '-' or '.', and must start and end with an alphanumeric
+ // character. A trailing dot is allowed. The total host name length must be no more
+ // than 253 characters.
+ //
+ // When the annotation is set to true, the host name must pass a smaller set of
+ // requirements, i.e.: character set as described above, and total host name
+ // length must be no more than 253 characters.
+ //
+ // NOTE: use of this annotation may validate routes that cannot be admitted and will
+ // not function. The annotation is provided to allow a custom scenario, e.g. a custom
+ // ingress controller that relies on the route API, but for some customized purpose
+ // needs to use routes with invalid hosts.
+ AllowNonDNSCompliantHostAnnotation = "route.openshift.io/allow-non-dns-compliant-host"
+)
