api icon indicating copy to clipboard operation
api copied to clipboard

Routev1 default host

Open mmadzin opened this issue 1 year ago • 0 comments

When no host and subdomain is specified then a generated name is created <route_name>-.apps.<cluster_url>. However the host length does not work as the error says.

exampe: apiVersion: route.openshift.io/v1 kind: Route metadata: name: aaaaabbbbbcccccdddddeeeeefffffggggghhhhhiiiiijjjjjkkkkklllll namespace: mm-test spec: to: kind: Service name: aaaaabb weight: 100 wildcardPolicy: None

Error: the Route "aaaaabbbbbcccccdddddeeeeefffffggggghhhhhiiiiijjjjjkkkkklllll" is invalid: spec.host: Invalid value: "aaaaabbbbbcccccdddddeeeeefffffggggghhhhhiiiiijjjjjkkkkklllll-mm-test.apps.my.server.domain.org": must be no more than 63 characters

However this 63 character check is applied only for the <route_name>- part. As soon as I change the name to "aaaaabbbbbcccccdddddeeeeefffffggggghhhhhiiiiijjjjj" then <route_name>- is shorten than 63 characters and the route is created even though the whole host is longer than 63 character.

Length of 63 characters is limiting for <route_name>-<project_name> which can be easily hit as Openshift allows project_name up to 63 characters.

If the dash is changed to dot in the host generation, the route_name and project_name would be recognized as two subdomains with limit 63 characters for each.

mmadzin avatar Jan 29 '25 19:01 mmadzin