-
Notifications
You must be signed in to change notification settings - Fork 4.7k
Description
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 to shard=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 when ROUTER_OVERRIDE_HOSTNAME="false"
is set.
Version
kubernetes v1.6.1+5115d708d7
features: Basic-Auth
Server https://console.prod.xxxx.io:443
openshift v3.6.0+c4dd4cf
kubernetes v1.6.1+5115d708d7
Steps To Reproduce
Create 2 or more router shards with different ROUTER_SUBDOMAIN's set.