-
Notifications
You must be signed in to change notification settings - Fork 361
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: move websocket config under config.route.v3.RouteAction #2683
Conversation
5e98b6a
to
1dccf00
Compare
internal/cmd/egctl/testdata/translate/out/default-resources.all.yaml
Outdated
Show resolved
Hide resolved
internal/cmd/egctl/testdata/translate/out/from-gateway-api-to-xds.all.yaml
Outdated
Show resolved
Hide resolved
internal/cmd/egctl/testdata/translate/out/from-gateway-api-to-xds.route.yaml
Outdated
Show resolved
Hide resolved
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #2683 +/- ##
==========================================
+ Coverage 63.43% 63.45% +0.01%
==========================================
Files 119 119
Lines 19477 19479 +2
==========================================
+ Hits 12356 12361 +5
+ Misses 6323 6321 -2
+ Partials 798 797 -1 ☔ View full report in Codecov by Sentry. |
Signed-off-by: Jesse Haka <haka.jesse@gmail.com>
Signed-off-by: Jesse Haka <haka.jesse@gmail.com>
1dccf00
to
2a95896
Compare
internal/xds/translator/route.go
Outdated
@@ -57,20 +57,27 @@ func buildXdsRoute(httpRoute *ir.HTTPRoute) (*routev3.Route, error) { | |||
|
|||
router.Action = &routev3.Route_Route{Route: routeAction} | |||
default: | |||
routeAction := buildXdsRouteAction(httpRoute.Destination.Name) |
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.
thanks for improving this logic, it could be further simplified with....
var routeAction *<type>
if httpRoute.BackendWeights.Invalid != 0 {
routeAction = buildXdsWeightedRouteAction(httpRoute)
else {
routeAction = buildXdsRouteAction(httpRoute.Destination.Name)
}
if httpRoute.Mirrors != nil {
routeAction.RequestMirrorPolicies = buildXdsRequestMirrorPolicies(httpRoute.Mirrors)
}
Signed-off-by: Jesse Haka <haka.jesse@gmail.com>
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 !
What type of PR is this?
fix: move websocket config under config.route.v3.RouteAction
What this PR does / why we need it:
If there were 1 grpc route under same listener, the websocket connections did not work at all. This should make websockets working under same listener which contains grpc routes.
Which issue(s) this PR fixes:
Fixes #2632
cc @arkodg