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
fix: duplicated xroutes are added to gatewayapi.Resources #3282
Conversation
Signed-off-by: Dingkang Li <dingkang1743@gmail.com>
Signed-off-by: Dingkang Li <dingkang1743@gmail.com>
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #3282 +/- ##
==========================================
+ Coverage 66.97% 67.01% +0.03%
==========================================
Files 164 166 +2
Lines 23882 23956 +74
==========================================
+ Hits 15994 16053 +59
- Misses 6964 6973 +9
- Partials 924 930 +6 ☔ View full report in Codecov by Sentry. |
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.
LGTM thanks !
/retest |
allAssociatedNamespaces map[string]struct{} | ||
// Map for storing TLSRoutes' NamespacedNames attaching to various Gateway objects. | ||
allAssociatedTLSRoutes map[string]struct{} | ||
// Map for storing HTTPRoutes' NamespacedNames attaching to various Gateway objects. | ||
allAssociatedHTTPRoutes map[string]struct{} | ||
// Map for storing GRPCRoutes' NamespacedNames attaching to various Gateway objects. | ||
allAssociatedGRPCRoutes map[string]struct{} | ||
// Map for storing TCPRoutes' NamespacedNames attaching to various Gateway objects. | ||
allAssociatedTCPRoutes map[string]struct{} | ||
// Map for storing UDPRoutes' NamespacedNames attaching to various Gateway objects. | ||
allAssociatedUDPRoutes map[string]struct{} |
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.
replace this with sets.set[string]
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.
tracked with #3411
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.
LGTM, with a followup
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.
LGTM, with a followup
What type of PR is this?
Fix duplicated TLSRoute/HTTPRoute/GRPCRoute/TCPRoute/UDPRoute are added to gatewayapi.Resources when single xRoute is attaching to multiple Gateways.
What this PR does / why we need it:
When single xRoute is attaching to multiple Gateways, this case is normal, different listeners with distinct certificates or transport sockets should route traffic to same backend. Duplicated xRoutes will be processed in
gatewayapi
module, then listener'sattachedRoutes
will be incorrect.Which issue(s) this PR fixes:
Fixes #3165