-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
Support hostnames in K8S Gateway #4402
Comments
External-DNS has always respected Gateway Listener Hostname and AllowedRoutes. Do you have a case where this isn't working? https://github.com/kubernetes-sigs/external-dns/blob/v0.14.2/source/gateway.go#L328-L358 |
@costinm Are you asking to use the Gateway CR as an External DNS source? @abursavich do you know if that ever been requested yet or discussed? I'm curious about the situation in which hostnames are specified on the Gateway Listener, but not in the xRoute. I don't believe External DNS has a way to create records using the Gateway CR, but it's a valid GWAPI configuration. Gateway Listener Merging, currently being discussed in kubernetes-sigs/gateway-api#3213, may have some implications for using Gateways Listener as a source. |
According to the GW-API spec, hostnames are essentially the intersection or overlap of those allowed by the Route and those allowed by the Listener. I believe this is what is being requested, but this is what the External DNS implementation has always done. |
Last time I checked, defining the hostname in Gateway CR and not in route didn't work. If gateway owner created the Gateway object and no route is present - I think DNS should still reflect the name. The routes may come and go as apps are deployed - for example certmanager may create a route to solve the challenge, remove it after. And once the user has certs they may deploy apps including HttpRoutes that attach to the internet gateway without knowing the hostname. AFAIK routes don't need to include the hostname. |
I see what you mean. The implementation does require the combination of Gateway Listeners and Routes. It won't use a Gateway without a Route. I still think it's reasonable to be serving a domain (with a Gateway Listener and Route) before creating a record for it. The intent is very clear at that point. Otherwise we're making assumptions that may not be true. As a concrete example, I wouldn't want to create wildcard records just because a Gateway Listener includes some wildcard (e.g. |
I'm actually interested in exactly this. In my situation, the gateway represents a proxy with an associated domain and load-balancer. As the gateway owner, I want a wildcard DNS record for that domain, pointing to that proxy/load-balancer. Route owners can attach routes with host names that fall under the domain name. As a gateway owner, I want a single wildcard DNS record for the gateway itself, not a DNS record for each route. |
What would you like to be added:
Use hostnames from the Gateway CR.
Why is this needed:
Current API supports using hostnames in HttpRoute - however users who want more security would define them in Gateway and specify allowRoutes - with the namespace where the Gateway is defined having stricter RBAC.
It's a relatively small change.
The text was updated successfully, but these errors were encountered: