-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Detecting Gateway hostnames based on attached HTTPRoutes #6051
Copy link
Copy link
Open
Labels
kind/featureCategorizes issue or PR as related to a new feature.Categorizes issue or PR as related to a new feature.lifecycle/frozenIndicates that an issue or PR should not be auto-closed due to staleness.Indicates that an issue or PR should not be auto-closed due to staleness.priority/important-longtermImportant over the long term, but may not be staffed and/or may need multiple releases to complete.Important over the long term, but may not be staffed and/or may need multiple releases to complete.
Metadata
Metadata
Assignees
Labels
kind/featureCategorizes issue or PR as related to a new feature.Categorizes issue or PR as related to a new feature.lifecycle/frozenIndicates that an issue or PR should not be auto-closed due to staleness.Indicates that an issue or PR should not be auto-closed due to staleness.priority/important-longtermImportant over the long term, but may not be staffed and/or may need multiple releases to complete.Important over the long term, but may not be staffed and/or may need multiple releases to complete.
Is your feature request related to a problem? Please describe.
The
Listener.hostnamefield is optional. The fieldHTTPRouteSpec.hostnamesis normally used to match "virtual" hostnames to backends. If hostnames are not specified in the listener, they may still be known by routes that support hostname matching (which I think is onlyHTTPRouteandGRPCRouteright now.)It would be practical if I didn't have to duplicate listeners for cert-manager, when the Gateway API (using Envoy in my case) supports not doing it.
Describe the solution you'd like
Checking supporting routes for additional hostnames, and matching the routes to gateway listeners would be the obvious solution.
This also means that a single listener in a Gateway may serve multiple hostnames, which AFAICT, cert-manager does not currently support. (?)
Describe alternatives you've considered
It is possible thatGatewayStatus.addressescontains hostnames that could be used instead. I have yet to investigate that.Edit: No, it doesn't look like it is populated with information from routes by Envoy.
Almost-duplicating listeners doesn't feel as nice as just adding a route resource. Coming from Traefik using route discovery with Docker labels, this is more tedious.
/kind feature