Implement Listener Hostnames and associated TLS mode on matching TLSRoutes #2475
Labels
area/gateway-api
Relating to upstream Kubernetes SIG Networking Gateway API
Milestone
Listener includes an optional core
Hostname
field. When present, Routes must have a hostname set that intersects with the Listener hostname (cardinality 1) set to associate with that Listener.Because the TLS mode is set by
Listener.TLS
association with a specific Listener is the only way to specify a TLS mode (terminate or passthrough). We must use parentRefs to set the Kong route protocol (ignoring the hack method of setting it using theprotocol
annotation).This probably requires some review of how we determine which Listener to match and what we do if there is ambiguity about which Listener matches. There's probably some stuff in the spec that clarifies how that sorts out and/or what ambiguities are impermissible.
Per conversation with other Gateway API implementers, Listeners permitting only a single Hostname is by design, because matching logic gets way overcomplicated otherwise. While a single match is sufficient, I think this may raise some confusing situations where a single TLSRoute matches multiple Listeners that specify different configurations, e.g. I think it's valid to have:
If that is permitted by the spec (again, need to read it more closely to be certain), which routes do we create? Relevant spec language states that:
This suggests that we should create separate routes for foo.example and bar.example, and do nothing for baz.example. I'm not sure then whether we indicate that the TLSRoute is only partially available (and if so, how) or if we reject it altogether.
The text was updated successfully, but these errors were encountered: