Skip to content

Commit

Permalink
fix testdata
Browse files Browse the repository at this point in the history
Signed-off-by: Jesse Haka <haka.jesse@gmail.com>
  • Loading branch information
zetaab committed Feb 23, 2024
1 parent a54f8dd commit 5e98b6a
Show file tree
Hide file tree
Showing 124 changed files with 202 additions and 144 deletions.
2 changes: 2 additions & 0 deletions internal/xds/translator/route.go
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,8 @@ func buildXdsRoute(httpRoute *ir.HTTPRoute) (*routev3.Route, error) {
routeAction.RequestMirrorPolicies = buildXdsRequestMirrorPolicies(httpRoute.Mirrors)
}
}
// Allow websocket upgrades for HTTP 1.1
// Reference: https://developer.mozilla.org/en-US/docs/Web/HTTP/Protocol_upgrade_mechanism
routeAction.UpgradeConfigs = []*routev3.RouteAction_UpgradeConfig{
{
UpgradeType: "websocket",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,6 @@
routeConfigName: extension-listener
serverHeaderTransformation: PASS_THROUGH
statPrefix: http
upgradeConfigs:
- upgradeType: websocket
useRemoteAddress: true
name: extension-listener
perConnectionBufferLimitBytes: 32768
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,3 +29,5 @@
value: foo.example.io/v1alpha1
route:
cluster: first-route-dest
upgradeConfigs:
- upgradeType: websocket
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,6 @@
routeConfigName: first-listener
serverHeaderTransformation: PASS_THROUGH
statPrefix: http
upgradeConfigs:
- upgradeType: websocket
useRemoteAddress: true
name: first-listener
perConnectionBufferLimitBytes: 32768
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,5 @@
name: first-route
route:
cluster: first-route-dest
upgradeConfigs:
- upgradeType: websocket
Original file line number Diff line number Diff line change
Expand Up @@ -138,8 +138,6 @@
routeConfigName: first-listener
serverHeaderTransformation: PASS_THROUGH
statPrefix: http
upgradeConfigs:
- upgradeType: websocket
useRemoteAddress: true
name: first-listener
perConnectionBufferLimitBytes: 32768
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,6 @@
routeConfigName: first-listener
serverHeaderTransformation: PASS_THROUGH
statPrefix: http
upgradeConfigs:
- upgradeType: websocket
useRemoteAddress: true
name: first-listener
perConnectionBufferLimitBytes: 32768
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@
name: first-route
route:
cluster: first-route-dest
upgradeConfigs:
- upgradeType: websocket
typedPerFilterConfig:
envoy.filters.http.basic_auth_first-route:
'@type': type.googleapis.com/envoy.config.route.v3.FilterConfig
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,6 @@
routeConfigName: first-listener
serverHeaderTransformation: PASS_THROUGH
statPrefix: http
upgradeConfigs:
- upgradeType: websocket
useRemoteAddress: true
name: first-listener
perConnectionBufferLimitBytes: 32768
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,5 @@
name: first-route
route:
cluster: first-route-dest
upgradeConfigs:
- upgradeType: websocket
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,6 @@
routeConfigName: first-listener
serverHeaderTransformation: PASS_THROUGH
statPrefix: http
upgradeConfigs:
- upgradeType: websocket
useRemoteAddress: true
xffNumTrustedHops: 2
name: first-listener
Expand Down Expand Up @@ -66,8 +64,6 @@
routeConfigName: second-listener
serverHeaderTransformation: PASS_THROUGH
statPrefix: http
upgradeConfigs:
- upgradeType: websocket
useRemoteAddress: false
name: second-listener
perConnectionBufferLimitBytes: 32768
Expand Down Expand Up @@ -107,8 +103,6 @@
routeConfigName: third-listener
serverHeaderTransformation: PASS_THROUGH
statPrefix: http
upgradeConfigs:
- upgradeType: websocket
useRemoteAddress: false
name: third-listener
perConnectionBufferLimitBytes: 32768
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@
name: first-route
route:
cluster: first-route-dest
upgradeConfigs:
- upgradeType: websocket
- ignorePortInHostMatching: true
name: second-listener
virtualHosts:
Expand All @@ -22,6 +24,8 @@
name: second-route
route:
cluster: second-route-dest
upgradeConfigs:
- upgradeType: websocket
- ignorePortInHostMatching: true
name: third-listener
virtualHosts:
Expand All @@ -34,3 +38,5 @@
name: third-route
route:
cluster: third-route-dest
upgradeConfigs:
- upgradeType: websocket
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,6 @@
requestTimeout: 5s
serverHeaderTransformation: PASS_THROUGH
statPrefix: http
upgradeConfigs:
- upgradeType: websocket
useRemoteAddress: true
name: first-listener
perConnectionBufferLimitBytes: 32768
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,5 @@
name: first-route
route:
cluster: first-route-dest
upgradeConfigs:
- upgradeType: websocket
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,6 @@
routeConfigName: first-listener
serverHeaderTransformation: PASS_THROUGH
statPrefix: http
upgradeConfigs:
- upgradeType: websocket
useRemoteAddress: true
name: first-listener
perConnectionBufferLimitBytes: 32768
2 changes: 2 additions & 0 deletions internal/xds/translator/testdata/out/xds-ir/cors.routes.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@
name: first-route
route:
cluster: first-route-dest
upgradeConfigs:
- upgradeType: websocket
typedPerFilterConfig:
envoy.filters.http.cors:
'@type': type.googleapis.com/envoy.extensions.filters.http.cors.v3.CorsPolicy
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,6 @@
routeConfigName: first-listener
serverHeaderTransformation: PASS_THROUGH
statPrefix: http
upgradeConfigs:
- upgradeType: websocket
useRemoteAddress: true
name: first-listener
perConnectionBufferLimitBytes: 32768
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@
name: httproute/default/httproute-1/rule/0/match/0/www_example_com
route:
cluster: httproute/default/httproute-1/rule/0
upgradeConfigs:
- upgradeType: websocket
typedPerFilterConfig:
envoy.filters.http.ext_authz_httproute/default/httproute-1/rule/0/match/0/www_example_com:
'@type': type.googleapis.com/envoy.config.route.v3.FilterConfig
Expand All @@ -19,6 +21,8 @@
name: httproute/default/httproute-2/rule/0/match/0/www_example_com
route:
cluster: httproute/default/httproute-2/rule/0
upgradeConfigs:
- upgradeType: websocket
typedPerFilterConfig:
envoy.filters.http.ext_authz_httproute/default/httproute-2/rule/0/match/0/www_example_com:
'@type': type.googleapis.com/envoy.config.route.v3.FilterConfig
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,6 @@
routeConfigName: first-listener
serverHeaderTransformation: PASS_THROUGH
statPrefix: http
upgradeConfigs:
- upgradeType: websocket
useRemoteAddress: true
name: first-listener
perConnectionBufferLimitBytes: 32768
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@
name: first-route
route:
cluster: first-route-dest
upgradeConfigs:
- upgradeType: websocket
typedPerFilterConfig:
envoy.filters.http.fault:
'@type': type.googleapis.com/envoy.extensions.filters.http.fault.v3.HTTPFault
Expand All @@ -23,6 +25,8 @@
name: second-route
route:
cluster: second-route-dest
upgradeConfigs:
- upgradeType: websocket
typedPerFilterConfig:
envoy.filters.http.fault:
'@type': type.googleapis.com/envoy.extensions.filters.http.fault.v3.HTTPFault
Expand All @@ -36,6 +40,8 @@
name: third-route
route:
cluster: third-route-dest
upgradeConfigs:
- upgradeType: websocket
typedPerFilterConfig:
envoy.filters.http.fault:
'@type': type.googleapis.com/envoy.extensions.filters.http.fault.v3.HTTPFault
Expand All @@ -54,6 +60,8 @@
name: fourth-route
route:
cluster: fourth-route-dest
upgradeConfigs:
- upgradeType: websocket
typedPerFilterConfig:
envoy.filters.http.fault:
'@type': type.googleapis.com/envoy.extensions.filters.http.fault.v3.HTTPFault
Expand All @@ -72,3 +80,5 @@
name: fifth-route
route:
cluster: fifth-route-dest
upgradeConfigs:
- upgradeType: websocket
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,6 @@
routeConfigName: first-listener
serverHeaderTransformation: PASS_THROUGH
statPrefix: http
upgradeConfigs:
- upgradeType: websocket
useRemoteAddress: true
name: first-listener
perConnectionBufferLimitBytes: 32768
Original file line number Diff line number Diff line change
Expand Up @@ -10,18 +10,26 @@
name: first-route
route:
cluster: first-route-dest
upgradeConfigs:
- upgradeType: websocket
- match:
prefix: /
name: second-route
route:
cluster: second-route-dest
upgradeConfigs:
- upgradeType: websocket
- match:
prefix: /
name: third-route
route:
cluster: third-route-dest
upgradeConfigs:
- upgradeType: websocket
- match:
prefix: /
name: fourth-route
route:
cluster: fourth-route-dest
upgradeConfigs:
- upgradeType: websocket
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,6 @@
routeConfigName: first-listener
serverHeaderTransformation: PASS_THROUGH
statPrefix: http
upgradeConfigs:
- upgradeType: websocket
useRemoteAddress: true
name: first-listener
perConnectionBufferLimitBytes: 32768
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,6 @@
routeConfigName: first-listener
serverHeaderTransformation: PASS_THROUGH
statPrefix: http
upgradeConfigs:
- upgradeType: websocket
useRemoteAddress: true
name: first-listener
perConnectionBufferLimitBytes: 32768
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,5 @@
name: first-route
route:
cluster: first-route-dest
upgradeConfigs:
- upgradeType: websocket
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,6 @@
routeConfigName: first-listener
serverHeaderTransformation: PASS_THROUGH
statPrefix: http
upgradeConfigs:
- upgradeType: websocket
useRemoteAddress: true
name: first-listener
perConnectionBufferLimitBytes: 32768
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,5 @@
name: mirror-route
route:
cluster: route-dest
upgradeConfigs:
- upgradeType: websocket
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,6 @@
routeConfigName: first-listener
serverHeaderTransformation: PASS_THROUGH
statPrefix: http
upgradeConfigs:
- upgradeType: websocket
useRemoteAddress: true
name: first-listener
perConnectionBufferLimitBytes: 32768
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,15 @@
name: envoy-gateway/httproute-2/rule/0/match/0/example.com
route:
cluster: first-route-dest
upgradeConfigs:
- upgradeType: websocket
- match:
pathSeparatedPrefix: /v1/example
name: envoy-gateway/httproute-3/rule/0/match/0/example.com
route:
cluster: second-route-dest
upgradeConfigs:
- upgradeType: websocket
- domains:
- example.net
name: first-listener/example_net
Expand All @@ -32,11 +36,15 @@
name: envoy-gateway/httproute-4/rule/0/match/0/example.net
route:
cluster: third-route-dest
upgradeConfigs:
- upgradeType: websocket
- match:
pathSeparatedPrefix: /v1/status
name: envoy-gateway/httproute-5/rule/0/match/0/example.net
route:
cluster: fourth-route-dest
upgradeConfigs:
- upgradeType: websocket
- domains:
- '*.com'
name: first-listener/*_com
Expand All @@ -46,6 +54,8 @@
name: envoy-gateway/httproute-1/rule/0/match/0/*.com
route:
cluster: fifth-route-dest
upgradeConfigs:
- upgradeType: websocket
- domains:
- '*.net'
name: first-listener/*_net
Expand All @@ -55,6 +65,8 @@
name: envoy-gateway/httproute-1/rule/0/match/0/*.net
route:
cluster: sixth-route-dest
upgradeConfigs:
- upgradeType: websocket
- domains:
- '*'
name: first-listener/*
Expand All @@ -64,3 +76,5 @@
name: envoy-gateway/httproute-1/rule/0/match/0/*
route:
cluster: seventh-route-dest
upgradeConfigs:
- upgradeType: websocket
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,6 @@
routeConfigName: first-listener
serverHeaderTransformation: PASS_THROUGH
statPrefix: http
upgradeConfigs:
- upgradeType: websocket
useRemoteAddress: true
name: first-listener
perConnectionBufferLimitBytes: 32768
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,5 @@
requestMirrorPolicies:
- cluster: mirror-route-dest
- cluster: mirror-route-dest1
upgradeConfigs:
- upgradeType: websocket
Loading

0 comments on commit 5e98b6a

Please sign in to comment.