Skip to content
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

Routev1 default host #2179

Open
mmadzin opened this issue Jan 29, 2025 · 0 comments
Open

Routev1 default host #2179

mmadzin opened this issue Jan 29, 2025 · 0 comments

Comments

@mmadzin
Copy link

mmadzin commented Jan 29, 2025

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant