Skip to content

Detecting Gateway hostnames based on attached HTTPRoutes #6051

@tommie

Description

@tommie

Is your feature request related to a problem? Please describe.

The Listener.hostname field is optional. The field HTTPRouteSpec.hostnames is 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 only HTTPRoute and GRPCRoute right 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 that GatewayStatus.addresses contains 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

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind/featureCategorizes issue or PR as related to a new feature.lifecycle/frozenIndicates 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.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions