Skip to content

Commit 1e80380

Browse files
committed
fix test
Signed-off-by: Huabing (Robin) Zhao <zhaohuabing@gmail.com>
1 parent b0fea99 commit 1e80380

File tree

5 files changed

+20
-12
lines changed

5 files changed

+20
-12
lines changed

internal/xds/translator/testdata/in/xds-ir/jsonpatch-with-jsonpath.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,14 @@ envoyPatchPolicies:
1010
namespace: "default"
1111
jsonPatches:
1212
- type: "type.googleapis.com/envoy.config.listener.v3.Listener"
13-
name: first-listener
13+
name: "::-10080"
1414
operation:
1515
op: "add"
1616
jsonPath: "$.filter_chains[0].filters[0].typed_config"
1717
path: "/preserve_external_request_id"
1818
value: true
1919
- type: "type.googleapis.com/envoy.config.listener.v3.Listener"
20-
name: "first-listener"
20+
name: "::-10080"
2121
operation:
2222
op: "add"
2323
jsonPath: "filter_chains[0].filters[0].typed_config.http_filters[0]"
@@ -34,7 +34,7 @@ envoyPatchPolicies:
3434
cluster_name: rate-limit-cluster
3535
transport_api_version: V3
3636
- type: "type.googleapis.com/envoy.config.route.v3.RouteConfiguration"
37-
name: "first-listener"
37+
name: "::-10080"
3838
operation:
3939
op: "add"
4040
jsonPath: "virtual_hosts[0]"
@@ -43,7 +43,7 @@ envoyPatchPolicies:
4343
- actions:
4444
- remote_address: {}
4545
- type: "type.googleapis.com/envoy.config.route.v3.RouteConfiguration"
46-
name: "first-listener"
46+
name: "::-10080"
4747
operation:
4848
op: "replace"
4949
jsonPath: "..routes[?(@.name=='second-route')].route.upgrade_configs"

internal/xds/translator/testdata/out/xds-ir/jsonpatch-with-jsonpath.envoypatchpolicies.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
namespace: default
1010
conditions:
1111
- lastTransitionTime: null
12-
message: 'Unable to find xds resources: type.googleapis.com/envoy.config.listener.v3.Listener/first-listener,type.googleapis.com/envoy.config.listener.v3.Listener/first-listener'
12+
message: 'Unable to find xds resources: type.googleapis.com/envoy.config.route.v3.RouteConfiguration/::-10080,type.googleapis.com/envoy.config.route.v3.RouteConfiguration/::-10080'
1313
reason: ResourceNotFound
1414
status: "False"
1515
type: Programmed

internal/xds/translator/testdata/out/xds-ir/jsonpatch-with-jsonpath.listeners.yaml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,25 @@
1414
initialStreamWindowSize: 65536
1515
maxConcurrentStreams: 100
1616
httpFilters:
17+
- name: envoy.filters.http.ratelimit
18+
typedConfig:
19+
'@type': type.googleapis.com/envoy.extensions.filters.http.ratelimit.v3.RateLimit
20+
domain: eg-ratelimit
21+
failureModeDeny: true
22+
rateLimitService:
23+
grpcService:
24+
envoyGrpc:
25+
clusterName: rate-limit-cluster
26+
transportApiVersion: V3
27+
timeout: 1s
1728
- name: envoy.filters.http.router
1829
typedConfig:
1930
'@type': type.googleapis.com/envoy.extensions.filters.http.router.v3.Router
2031
suppressEnvoyHeaders: true
2132
mergeSlashes: true
2233
normalizePath: true
2334
pathWithEscapedSlashesAction: UNESCAPE_AND_REDIRECT
35+
preserveExternalRequestId: true
2436
rds:
2537
configSource:
2638
ads: {}

internal/xds/translator/testdata/out/xds-ir/jsonpatch-with-jsonpath.routes.yaml

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,6 @@
44
- domains:
55
- '*'
66
name: first-listener/*
7-
rateLimits:
8-
- actions:
9-
- remoteAddress: {}
107
routes:
118
- match:
129
headers:
@@ -32,5 +29,4 @@
3229
route:
3330
cluster: second-route-dest
3431
upgradeConfigs:
35-
- connectConfig: {}
36-
upgradeType: CONNECT
32+
- upgradeType: websocket

internal/xds/translator/testdata/out/xds-ir/listener-overlapping-tls-config.listeners.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -103,11 +103,11 @@
103103
- kind: Gateway
104104
name: gateway-1
105105
namespace: envoy-gateway
106-
sectionName: https-2
106+
sectionName: https-1
107107
- kind: Gateway
108108
name: gateway-1
109109
namespace: envoy-gateway
110-
sectionName: https-1
110+
sectionName: https-2
111111
name: 0.0.0.0-10443
112112
perConnectionBufferLimitBytes: 32768
113113
- address:

0 commit comments

Comments
 (0)