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
Routes created with wrong dns suffix when using router shards #16797
Comments
@knobunc We did like this on the release-3.6 branch to workaround the issue:
|
Issues go stale after 90d of inactivity. Mark the issue as fresh by commenting If this issue is safe to close now please do so with /lifecycle stale |
Can this be transformed in a pull request and bring the change into OCP 3.6 or 3.7? |
@codrinbucur sure, will create a PR for this, not sure though if our hack is that generic, will try to enhance it. |
@cldmnky - Thanks! |
@cldmnky there's two router options that control blacklisting and whitelisting route domains. So doing something like:
should work for you on your public and/or trusted router. Please let us know if that works. Thx |
@ramr I just tried with the
And creating the route with an empty hostname and labels:
|
The default router domain must be set in the master-config.yaml, and when creating a route without a hostname the controller sets the hostname to the default router domain, thus never allowing us to use the |
@cldmnky aah my bad. I misread this initially as you wanted to reject the routes with the |
…ced with the subdomain/hostname-template the router environment is running under. Fixes issue openshift#16797
with the subdomain/hostname-template that the router environment is running under. Fixes issue openshift#16797
The PR #19418 works fine! And while were at it, |
with the subdomain/hostname-template that the router environment is running under. Fixes issue openshift#16797
with the subdomain/hostname-template that the router environment is running under. And fix typos as per @knobunc review Fixes issue openshift#16797
with the subdomain/hostname-template that the router environment is running under. And fix typos as per @knobunc review Fixes issue openshift#16797
with the subdomain/hostname-template that the router environment is running under. And fix typos as per @knobunc review Fixes issue openshift#16797
Stale issues rot after 30d of inactivity. Mark the issue as fresh by commenting If this issue is safe to close now please do so with /lifecycle rotten |
Rotten issues close after 30d of inactivity. Reopen the issue by commenting /close |
We are using 3 router shards with route labels, serving different subdomains:
*.internal.example.com
,*.trusted.example.com
and*.public.example.com
The internal router shard is created with:
ROUTE_LABELS="shard notin (public, trusted)"
andROUTER_SUBDOMAIN="${name}-${namespace}.internal.example.com"
The public router shard is created with:
ROUTE_LABELS="shard=public"
andROUTER_SUBDOMAIN="${name}-${namespace}.public.example.com"
The trusted router shard is created with:
ROUTE_LABELS="shard=trusted"
andROUTER_SUBDOMAIN="${name}-${namespace}.trusted.example.com"
The default RouterConfig subdomain in our master-config's is set to
internal.example.com
.Setting
ROUTER_OVERRIDE_HOSTNAME="true"
on the routers makes everything work as expected:A route created without any labels is claimed by the
internal
router shard and admitted as${name}-${namespace}.internal.example.com
A route created with labels
shard=public
is claimed by thepublic
router and admitted as${name}-${namespace}.public.example.com
.But with the
ROUTER_OVERRIDE_HOSTNAME
we cannot create our own hostnames.If we set
ROUTER_OVERRIDE_HOSTNAME="false"
on our routers all "empty" routes are admitted as${name}-${namespace}.internal.example.com
on our routers. So setting a route label toshard=public
will create the route on the public router but with a hostname of${name}-${namespace}.internal.example.com
, thus making it impossible to direct traffic to the route.We would expect that the route controller respects the
ROUTER_SUBDOMAIN
of the router when admitting empty routes claimed by a router shard whenROUTER_OVERRIDE_HOSTNAME="false"
is set.Version
Steps To Reproduce
Create 2 or more router shards with different ROUTER_SUBDOMAIN's set.
The text was updated successfully, but these errors were encountered: