Support Gateway HTTP listener isolation#14234
Conversation
Signed-off-by: Daneyon Hansen <[email protected]>
There was a problem hiding this comment.
Pull request overview
Adds Gateway API GatewayHTTPListenerIsolation behavior for same-port HTTP listeners by preventing routes on less-specific listeners from contributing hostnames that are “owned” by more-specific sibling listeners when building shared virtual hosts. This enables kgateway to advertise HTTP listener isolation conformance.
Changes:
- Introduced hostname filtering logic to implement HTTP listener isolation when multiple HTTP listeners share the same port.
- Refactored route-to-hostname aggregation to support an optional hostname filter and to avoid falling back to
"*"after filtering removes all hostnames. - Updated GatewayClass supported-features logic/tests to advertise
SupportGatewayHTTPListenerIsolation.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| pkg/kgateway/translator/listener/gateway_listener_translator.go | Adds listener-hostname precedence/coverage helpers and applies filtering while building routes-per-host for shared HTTP filter chains. |
| pkg/kgateway/translator/listener/gateway_listener_translator_internal_test.go | Adds focused unit tests for hostname isolation filtering and the new route-hostname filtering behavior. |
| pkg/deployer/gatewayclass.go | Stops exempting HTTP listener isolation so it can be advertised as supported. |
| pkg/deployer/gatewayclass_test.go | Asserts SupportGatewayHTTPListenerIsolation is included in supported features. |
Signed-off-by: Daneyon Hansen <[email protected]>
|
AI review uncovered existing minor issue in translateHttpFilterChain: Latent inconsistency between two specificity metrics (worth a note). The new filter |
Description
Adds HTTP listener isolation for same-port HTTP listeners by filtering route hostnames owned by more-specific sibling listeners before building shared virtual hosts. This lets kgateway advertise the GatewayHTTPListenerIsolation feature.
Change Type
/kind feature
Changelog
Additional Notes
Tested with:
go test -tags e2e ./pkg/kgateway/translator/listener ./pkg/deployer