Skip to content

Memorandum GEP - The concept of "Hostnames" on GatewayAPI #4187

@rikatz

Description

@rikatz

What would you like to be added:
A Memorandum GEP explaining all of the concepts of "Hostname" on Gateway API, how they are used by controllers, different conflicts and intersections.

Why this is needed:
The concept of hostnames on Gateway API is very complex (to not say confusing) for users and even for developers. What a hostname on Gateway Listener means is different from what a Hostname on a xRoute means, and with ListenerSet introduction this can get worst.

This way, having a memorandum GEP explaining what each hostname field means, how they are used, and so on may help clarifying the concept.

Additionally, we need a user facing guidance/doc to explain that, per different persona model on Gateway API, when the cluster operator sets a hostname on a Gateway is different from when developers set their hostnames on their routes.

More context: https://kubernetes.slack.com/archives/CR0H13KGA/p1760446896183029

Nick gave a very good set of examples, which I will reproduce here as is to be used during the GEP creation


  • NLB *.domain, Listener *.domain, HTTPRoute specific.domain, requests to specific.domain will have TLS terminated at the NLB, pass the Listener, and match the HTTPRoute, routing traffic as per the HTTPRoute.
  • NLB *.domain, Listener *.domain, HTTPRoute other.domain, requests to specific.domain will have TLS terminated at the NLB, but will get a 404 when the traffic reaches the Gateway, because, while the Listener matches, the HTTPRoute does not.
  • NLB *.domain, Listener specific.domain, HTTPRoute specific.domain, this will also work because everything lines up.
  • NLB *.domain, Listener specific.domain, HTTPRoute *.domain, this will work because the HTTPRoute and the Listener domain intersect correctly.
  • NLB *.domain , Listener specific.domain, HTTPRoute other.domain, this HTTPRoute will not attach to the Listener (there will be an error in the HTTPRoute status.conditions), and the traffic will not flow.
  • NLB *.domain, Listener *.domain, HTTPRoute no hostname set, requests to any hostname matching *.domain, including specific.domain and other.domain will be routed to the HTTPRoute backends.
  • NLB *.domain, Listener specific.domain, HTTPRoute no hostname set, only requests to specific.domain will be routed to the HTTPRoute backends

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind/featureCategorizes issue or PR as related to a new feature.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions