kubernetes-sigs / kubernetes-sigs/gateway-api
fix/conformance: HTTPRoute status did not update after Gateway listener hostname change
- Dominant language
- Go
- Stars
- 3k
- Forks
- 789
- Avg merge
- 2d 15h
- Merged PRs (30d)
- 45
Description
**What happened**:
When a Gateway listener has a hostname that does not match an HTTPRoute's hostname, the HTTPRoute is rejected with Accepted=False / NoMatchingListenerHostname. If the Gateway listener hostname is later updated to match the route's hostname, some implementations do not update the HTTPRoute's status.parents[].conditions — leaving a stale Accepted=False condition even though the route should now be accepted.
**Why it matters**:
The spec language in RouteStatus used 'should' update (a non-normative recommendation) rather than MUST update, giving implementations room to skip the status update when the Gateway is modified. This ambiguity means conformance tests could not reliably enforce the behavior.
Stale route status misleads operators and tooling. A user who updates a Gateway listener to fix a hostname mismatch has no reliable signal that the fix took effect if the route status is never updated. This breaks observability and any automation that watches route conditions.
**What you expected to happen**:
After a Gateway listener hostname is updated to match an HTTPRoute's hostname, the implementation MUST update status.parents[].conditions on the HTTPRoute to reflect Accepted=True / Accepted.
**How to reproduce it (as minimally and precisely as possible)**:
1. Have HTTPRoute X bound to Gateway where no listener matches X's hostname. Status condition
> correctly reports:
> type: Accepted
> status: "False"
> reason: NoMatchingListenerHostname
2. Update Gateway to add a listener whose hostname matches X.
3. Observe that the data plane begins serving X's hostname correctly — routing works end-to-end.
4. Inspect kubectl get httproute X -o yaml: the Accepted=False/NoMatchingListenerHostname condition is still present indefinitely. observedGeneration reflects the route's last generation, not the listener change.
**Anything else we need to know?**:
Proposal:
1. Strengthen the spec: change should update to MUST update in RouteStatus (apis/v1/shared_types.go) to make the requirement normative.
2. Add a conformance test that verifies: the HTTPRoute starts as Accepted=False, a patch to the Gateway listener hostname is applied, and the HTTPRoute status is subsequently updated to Accepted=True.
Contributor guide
Assessment
This issue has not been assessed yet.