-
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: Arko Dasgupta <arko@tetrate.io>
- Loading branch information
Showing
5 changed files
with
129 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
http: | ||
- name: "first-listener" | ||
address: "0.0.0.0" | ||
port: 10080 | ||
hostnames: | ||
- "*" | ||
routes: | ||
- name: "first-route" | ||
rateLimit: | ||
global: | ||
rules: | ||
- headerMatches: | ||
- name: "x-user-id" | ||
exact: "one" | ||
limit: | ||
requests: 5 | ||
unit: second | ||
pathMatch: | ||
name: "test" | ||
exact: "foo/bar" | ||
destinations: | ||
- host: "1.2.3.4" | ||
port: 50000 |
35 changes: 35 additions & 0 deletions
35
internal/xds/translator/testdata/out/xds-ir/ratelimit.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,35 @@ | ||
- commonLbConfig: | ||
localityWeightedLbConfig: {} | ||
connectTimeout: 5s | ||
dnsLookupFamily: V4_ONLY | ||
loadAssignment: | ||
clusterName: first-route | ||
endpoints: | ||
- lbEndpoints: | ||
- endpoint: | ||
address: | ||
socketAddress: | ||
address: 1.2.3.4 | ||
portValue: 50000 | ||
loadBalancingWeight: 1 | ||
locality: {} | ||
name: first-route | ||
outlierDetection: {} | ||
type: STATIC | ||
- connectTimeout: 10s | ||
dnsLookupFamily: V4_ONLY | ||
dnsRefreshRate: 30s | ||
http2ProtocolOptions: {} | ||
lbPolicy: RANDOM | ||
loadAssignment: | ||
clusterName: ratelimit_cluster | ||
endpoints: | ||
- lbEndpoints: | ||
- endpoint: | ||
address: | ||
socketAddress: | ||
address: TODO | ||
portValue: 0 | ||
name: ratelimit_cluster | ||
respectDnsTtl: true | ||
type: STRICT_DNS |
49 changes: 49 additions & 0 deletions
49
internal/xds/translator/testdata/out/xds-ir/ratelimit.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,49 @@ | ||
- 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.ratelimit | ||
typedConfig: | ||
'@type': type.googleapis.com/envoy.extensions.filters.http.ratelimit.v3.RateLimit | ||
domain: first-listener | ||
rateLimitService: | ||
grpcService: | ||
envoyGrpc: | ||
clusterName: ratelimit_cluster | ||
transportApiVersion: V3 | ||
- 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 |
19 changes: 19 additions & 0 deletions
19
internal/xds/translator/testdata/out/xds-ir/ratelimit.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,19 @@ | ||
- name: first-listener | ||
virtualHosts: | ||
- domains: | ||
- '*' | ||
name: first-listener | ||
routes: | ||
- match: | ||
path: foo/bar | ||
route: | ||
cluster: first-route | ||
rateLimits: | ||
- actions: | ||
- headerValueMatch: | ||
descriptorValue: first-route-value-rule-0-match-0 | ||
expectMatch: true | ||
headers: | ||
- name: x-user-id | ||
stringMatch: | ||
exact: one |
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