-
Notifications
You must be signed in to change notification settings - Fork 104
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Listener Isolation for hostnames occupied by other listeners #3067
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #3067 +/- ##
==========================================
+ Coverage 89.95% 90.00% +0.04%
==========================================
Files 111 111
Lines 11453 11501 +48
Branches 50 50
==========================================
+ Hits 10303 10351 +48
Misses 1089 1089
Partials 61 61 ☔ View full report in Codecov by Sentry. |
a63597d
to
518e97e
Compare
2dfb22a
to
3d10bcd
Compare
@salonichf5 what happens when a route attaches to multiple gateways? Or when a route omits the sectionName in the parentRef (effectively matching all listeners in the Gateway)? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚀
1c20664
to
1bc1731
Compare
Proposed changes
Write a clear and concise description that helps reviewers understand the purpose and impact of your changes. Use the
following format:
Problem: Users want to be able to isolate listeners for routes.
Solution: Adds functionality to filter out listener hostnames from the accepted hostnames of a route which belong to another listener.
Testing:
Listeners that are configured with the gateway
HTTPRoutes
For listener isolation to work, we need
empty-hostname
to not get configured with listenerswildcard-example-com, wildcard-foo-example-com, abc-foo-example-com
. When collecting accepted hostnames, the routeattaches-to-empty-hostname-with-hostname-intersection
attaches to all hostnames since it is attached to catch-all listener (no hostname provided), but these hostnames are part of other listeners.So,
wildcard-example-com
to not get configured with listenerswildcard-foo-example-com, abc-foo-example-com
When collecting accepted hostnames, the route
attaches-to-wildcard-example-com-with-hostname-intersection
is associated to a*.example.com
so it attaches to these hostnames. But these listeners need to be isolated since the hostname associated with them is part of a listener attached to another route."*.foo.example.com" # request matching is prevented by the isolation wildcard-foo-example-com listener
"abc.foo.example.com" # request matching is prevented by the isolation of abc-foo-example-com listener
Manual testing for L4 Routes
As per above configuration, this route should only be configured for
bar.com
since*.example.com
is part of another listener and the sectionName belongs to first listenertls
Curl to a hostname of type
*.example.com
fails.Please focus on (optional): If you any specific areas where you would like reviewers to focus their attention or provide
specific feedback, add them here.
Closes #1175
Checklist
Before creating a PR, run through this checklist and mark each as complete.
Release notes
If this PR introduces a change that affects users and needs to be mentioned in the release notes,
please add a brief note that summarizes the change.