-
Notifications
You must be signed in to change notification settings - Fork 347
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: bitliu <bitliu@tencent.com>
- Loading branch information
Showing
25 changed files
with
655 additions
and
38 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
21 changes: 21 additions & 0 deletions
21
internal/xds/translator/testdata/in/xds-ir/http-route-weighted-backend.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
http: | ||
- name: "first-listener" | ||
address: "0.0.0.0" | ||
port: 10080 | ||
hostnames: | ||
- "*" | ||
routes: | ||
- name: "first-route" | ||
destinations: | ||
- host: "1.1.1.1" | ||
port: 50001 | ||
weight: 20 | ||
- host: "2.2.2.2" | ||
port: 50002 | ||
weight: 40 | ||
- host: "3.3.3.3" | ||
port: 50003 | ||
weight: 20 | ||
- host: "4.4.4.4" | ||
port: 50004 | ||
weight: 20 |
41 changes: 41 additions & 0 deletions
41
internal/xds/translator/testdata/in/xds-ir/multiple-simple-tcp-route-same-port.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
tcp: | ||
- name: "tcp-route-simple" | ||
address: "0.0.0.0" | ||
port: 10080 | ||
destinations: | ||
- host: "1.2.3.4" | ||
port: 50000 | ||
- host: "5.6.7.8" | ||
port: 50001 | ||
- name: "tcp-route-simple-1" | ||
address: "0.0.0.0" | ||
port: 10080 | ||
destinations: | ||
- host: "1.2.3.4" | ||
port: 50000 | ||
- host: "5.6.7.8" | ||
port: 50001 | ||
- name: "tcp-route-simple-2" | ||
address: "0.0.0.0" | ||
port: 10080 | ||
destinations: | ||
- host: "1.2.3.4" | ||
port: 50000 | ||
- host: "5.6.7.8" | ||
port: 50001 | ||
- name: "tcp-route-simple-3" | ||
address: "0.0.0.0" | ||
port: 10080 | ||
destinations: | ||
- host: "1.2.3.4" | ||
port: 50000 | ||
- host: "5.6.7.8" | ||
port: 50001 | ||
- name: "tcp-route-simple-4" | ||
address: "0.0.0.0" | ||
port: 10080 | ||
destinations: | ||
- host: "1.2.3.4" | ||
port: 50000 | ||
- host: "5.6.7.8" | ||
port: 50001 |
14 changes: 14 additions & 0 deletions
14
internal/xds/translator/testdata/in/xds-ir/tcp-route-complex.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
tcp: | ||
- name: "tcp-route-complex" | ||
address: "0.0.0.0" | ||
port: 10080 | ||
tls: | ||
snis: | ||
- foo.com | ||
- bar.com | ||
- example.com | ||
destinations: | ||
- host: "1.2.3.4" | ||
port: 50000 | ||
- host: "5.6.7.8" | ||
port: 50001 |
9 changes: 9 additions & 0 deletions
9
internal/xds/translator/testdata/in/xds-ir/tcp-route-simple.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
tcp: | ||
- name: "tcp-route-simple" | ||
address: "0.0.0.0" | ||
port: 10080 | ||
destinations: | ||
- host: "1.2.3.4" | ||
port: 50000 | ||
- host: "5.6.7.8" | ||
port: 50001 |
22 changes: 22 additions & 0 deletions
22
internal/xds/translator/testdata/in/xds-ir/tcp-route-weighted-backend.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
tcp: | ||
- name: "tcp-route-weighted-backend" | ||
address: "0.0.0.0" | ||
port: 10080 | ||
tls: | ||
snis: | ||
- foo.com | ||
- bar.com | ||
- example.com | ||
destinations: | ||
- host: "1.1.1.1" | ||
port: 50001 | ||
weight: 20 | ||
- host: "2.2.2.2" | ||
port: 50002 | ||
weight: 40 | ||
- host: "3.3.3.3" | ||
port: 50003 | ||
weight: 20 | ||
- host: "4.4.4.4" | ||
port: 50004 | ||
weight: 20 |
37 changes: 37 additions & 0 deletions
37
internal/xds/translator/testdata/out/xds-ir/http-route-weighted-backend.clusters.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
- commonLbConfig: | ||
localityWeightedLbConfig: {} | ||
connectTimeout: 5s | ||
dnsLookupFamily: V4_ONLY | ||
loadAssignment: | ||
clusterName: first-route | ||
endpoints: | ||
- lbEndpoints: | ||
- endpoint: | ||
address: | ||
socketAddress: | ||
address: 1.1.1.1 | ||
portValue: 50001 | ||
loadBalancingWeight: 20 | ||
- endpoint: | ||
address: | ||
socketAddress: | ||
address: 2.2.2.2 | ||
portValue: 50002 | ||
loadBalancingWeight: 40 | ||
- endpoint: | ||
address: | ||
socketAddress: | ||
address: 3.3.3.3 | ||
portValue: 50003 | ||
loadBalancingWeight: 20 | ||
- endpoint: | ||
address: | ||
socketAddress: | ||
address: 4.4.4.4 | ||
portValue: 50004 | ||
loadBalancingWeight: 20 | ||
loadBalancingWeight: 1 | ||
locality: {} | ||
name: first-route | ||
outlierDetection: {} | ||
type: STATIC |
40 changes: 40 additions & 0 deletions
40
internal/xds/translator/testdata/out/xds-ir/http-route-weighted-backend.listeners.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
- accessLog: | ||
- filter: | ||
responseFlagFilter: | ||
flags: | ||
- NR | ||
name: envoy.access_loggers.file | ||
typedConfig: | ||
'@type': type.googleapis.com/envoy.extensions.access_loggers.file.v3.FileAccessLog | ||
path: /dev/stdout | ||
address: | ||
socketAddress: | ||
address: 0.0.0.0 | ||
portValue: 10080 | ||
defaultFilterChain: | ||
filters: | ||
- name: envoy.filters.network.http_connection_manager | ||
typedConfig: | ||
'@type': type.googleapis.com/envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager | ||
accessLog: | ||
- name: envoy.access_loggers.file | ||
typedConfig: | ||
'@type': type.googleapis.com/envoy.extensions.access_loggers.file.v3.FileAccessLog | ||
path: /dev/stdout | ||
httpFilters: | ||
- name: envoy.filters.http.router | ||
typedConfig: | ||
'@type': type.googleapis.com/envoy.extensions.filters.http.router.v3.Router | ||
rds: | ||
configSource: | ||
apiConfigSource: | ||
apiType: DELTA_GRPC | ||
grpcServices: | ||
- envoyGrpc: | ||
clusterName: xds_cluster | ||
setNodeOnFirstMessageOnly: true | ||
transportApiVersion: V3 | ||
resourceApiVersion: V3 | ||
routeConfigName: first-listener | ||
statPrefix: http | ||
name: first-listener |
10 changes: 10 additions & 0 deletions
10
internal/xds/translator/testdata/out/xds-ir/http-route-weighted-backend.routes.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
- name: first-listener | ||
virtualHosts: | ||
- domains: | ||
- '*' | ||
name: first-listener | ||
routes: | ||
- match: | ||
prefix: / | ||
route: | ||
cluster: first-route |
Oops, something went wrong.