You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, the HTTPRoute source may fallback to using the attached Gatewaylistener.hostname if no other target is found. This can be problematic if that hostname was never intended to become a DNS record.
What would you like to be added:
Have the final fallback in HTTPRoutes target identification, If no endpoints were produced by the previous steps, each attached Gateway listener will use its hostname, if present., configurable. Not sure at what level, or multiple.
Why is this needed:
When sourcing from gateway api resources and specifying hostname(s) on your Gateway, you currently have to accept that these may become DNS entries. Even if you expect HTTPRoute or other "child" resources to set their own hostnames - should a configuration error on a Gateways child resource cause an unavoidable DNS "leak" up the tree?
There are multiple reasons for specifying listener.hostname without any DNS intentions, e.g. cert management.
Example use case:
Deploying a cluster-wide gateway for all inbound traffic, which terminates TLS. You may want generic listeners, but still specify hostnames to e.g. enable the cert-manager auto generated cert (which requires hostname). To achieve this, you may wildcard the Gateway listener hostname (*.foo.com) and allow HTTPRoutes to register specific records (bar.foo.com). If the HTTPRoute fails to specify a hostname, the wildcard entry is registered which may have unintended consequences.
The text was updated successfully, but these errors were encountered:
May I enquire as to whether the issue described only pertains to wildcard hostnames associated with Gateway listeners?
The closest current unit-test case appears to be TestGatewayHTTPRouteSourceEndpoints/WildcardInRouteAndGateway, which states that for an HTTPRoute with hostname *.example.internal and a Gateway listener with hostname *.example.internal a DNS record with name *.example.internal should be generated. I find this assertion surprising; I wasn't aware that a DNS record with name *.example.internal. was valid, although my experimentation with Google's CloudDNS permitted creation of such a named record.
The example use case described would involve a similar scenario to the identified unit-test case, except the HTTPRoute would have no hostname specified. In such a scenario a DNS record with name *.example.internal would also be generated by the current implementation.
I'm trying to understand why all hostnames, as deduced via the gwMatchingHost(…) function, with a prefix of *. are not discarded, which might be achieved by the following change:
Currently, the
HTTPRoute
source may fallback to using the attachedGateway
listener.hostname
if no other target is found. This can be problematic if that hostname was never intended to become a DNS record.What would you like to be added:
Have the final fallback in
HTTPRoute
s target identification,If no endpoints were produced by the previous steps, each attached Gateway listener will use its hostname, if present.
, configurable. Not sure at what level, or multiple.Why is this needed:
When sourcing from
gateway
api resources and specifying hostname(s) on your Gateway, you currently have to accept that these may become DNS entries. Even if you expectHTTPRoute
or other "child" resources to set their own hostnames - should a configuration error on aGateway
s child resource cause an unavoidable DNS "leak" up the tree?There are multiple reasons for specifying
listener.hostname
without any DNS intentions, e.g. cert management.Example use case:
Deploying a cluster-wide gateway for all inbound traffic, which terminates TLS. You may want generic listeners, but still specify hostnames to e.g. enable the cert-manager auto generated cert (which requires hostname). To achieve this, you may wildcard the
Gateway
listener hostname (*.foo.com
) and allowHTTPRoute
s to register specific records (bar.foo.com
). If theHTTPRoute
fails to specify a hostname, the wildcard entry is registered which may have unintended consequences.The text was updated successfully, but these errors were encountered: