2020-04-14 21:30:00 +00:00
|
|
|
{
|
|
|
|
"versionInfo": "00000001",
|
|
|
|
"resources": [
|
|
|
|
{
|
2021-02-26 22:23:15 +00:00
|
|
|
"@type": "type.googleapis.com/envoy.config.route.v3.RouteConfiguration",
|
2022-03-07 17:47:14 +00:00
|
|
|
"name": "8080",
|
2020-04-14 21:30:00 +00:00
|
|
|
"virtualHosts": [
|
|
|
|
{
|
|
|
|
"name": "db",
|
|
|
|
"domains": [
|
2020-07-07 15:43:04 +00:00
|
|
|
"db.ingress.*",
|
2022-03-07 17:47:14 +00:00
|
|
|
"db.ingress.*:8080"
|
2020-04-14 21:30:00 +00:00
|
|
|
],
|
|
|
|
"routes": [
|
|
|
|
{
|
|
|
|
"match": {
|
|
|
|
"prefix": "/prefix"
|
|
|
|
},
|
|
|
|
"route": {
|
|
|
|
"cluster": "prefix.default.dc1.internal.11111111-2222-3333-4444-555555555555.consul"
|
|
|
|
}
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"match": {
|
|
|
|
"path": "/exact"
|
|
|
|
},
|
|
|
|
"route": {
|
|
|
|
"cluster": "exact.default.dc1.internal.11111111-2222-3333-4444-555555555555.consul"
|
|
|
|
}
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"match": {
|
2020-07-09 22:04:51 +00:00
|
|
|
"safeRegex": {
|
|
|
|
"googleRe2": {
|
|
|
|
|
|
|
|
},
|
|
|
|
"regex": "/regex"
|
|
|
|
}
|
2020-04-14 21:30:00 +00:00
|
|
|
},
|
|
|
|
"route": {
|
|
|
|
"cluster": "regex.default.dc1.internal.11111111-2222-3333-4444-555555555555.consul"
|
|
|
|
}
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"match": {
|
|
|
|
"prefix": "/",
|
|
|
|
"headers": [
|
|
|
|
{
|
|
|
|
"name": "x-debug",
|
|
|
|
"presentMatch": true
|
|
|
|
}
|
|
|
|
]
|
|
|
|
},
|
|
|
|
"route": {
|
|
|
|
"cluster": "hdr-present.default.dc1.internal.11111111-2222-3333-4444-555555555555.consul"
|
|
|
|
}
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"match": {
|
|
|
|
"prefix": "/",
|
|
|
|
"headers": [
|
|
|
|
{
|
|
|
|
"name": "x-debug",
|
|
|
|
"presentMatch": true,
|
|
|
|
"invertMatch": true
|
|
|
|
}
|
|
|
|
]
|
|
|
|
},
|
|
|
|
"route": {
|
|
|
|
"cluster": "hdr-not-present.default.dc1.internal.11111111-2222-3333-4444-555555555555.consul"
|
|
|
|
}
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"match": {
|
|
|
|
"prefix": "/",
|
|
|
|
"headers": [
|
|
|
|
{
|
|
|
|
"name": "x-debug",
|
|
|
|
"exactMatch": "exact"
|
|
|
|
}
|
|
|
|
]
|
|
|
|
},
|
|
|
|
"route": {
|
|
|
|
"cluster": "hdr-exact.default.dc1.internal.11111111-2222-3333-4444-555555555555.consul"
|
|
|
|
}
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"match": {
|
|
|
|
"prefix": "/",
|
|
|
|
"headers": [
|
|
|
|
{
|
|
|
|
"name": "x-debug",
|
|
|
|
"prefixMatch": "prefix"
|
|
|
|
}
|
|
|
|
]
|
|
|
|
},
|
|
|
|
"route": {
|
|
|
|
"cluster": "hdr-prefix.default.dc1.internal.11111111-2222-3333-4444-555555555555.consul"
|
|
|
|
}
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"match": {
|
|
|
|
"prefix": "/",
|
|
|
|
"headers": [
|
|
|
|
{
|
|
|
|
"name": "x-debug",
|
|
|
|
"suffixMatch": "suffix"
|
|
|
|
}
|
|
|
|
]
|
|
|
|
},
|
|
|
|
"route": {
|
|
|
|
"cluster": "hdr-suffix.default.dc1.internal.11111111-2222-3333-4444-555555555555.consul"
|
|
|
|
}
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"match": {
|
|
|
|
"prefix": "/",
|
|
|
|
"headers": [
|
|
|
|
{
|
|
|
|
"name": "x-debug",
|
2020-07-09 22:04:51 +00:00
|
|
|
"safeRegexMatch": {
|
|
|
|
"googleRe2": {
|
|
|
|
|
|
|
|
},
|
|
|
|
"regex": "regex"
|
|
|
|
}
|
2020-04-14 21:30:00 +00:00
|
|
|
}
|
|
|
|
]
|
|
|
|
},
|
|
|
|
"route": {
|
|
|
|
"cluster": "hdr-regex.default.dc1.internal.11111111-2222-3333-4444-555555555555.consul"
|
|
|
|
}
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"match": {
|
|
|
|
"prefix": "/",
|
|
|
|
"headers": [
|
|
|
|
{
|
|
|
|
"name": ":method",
|
2020-07-09 22:04:51 +00:00
|
|
|
"safeRegexMatch": {
|
|
|
|
"googleRe2": {
|
|
|
|
|
|
|
|
},
|
|
|
|
"regex": "GET|PUT"
|
|
|
|
}
|
2020-04-14 21:30:00 +00:00
|
|
|
}
|
|
|
|
]
|
|
|
|
},
|
|
|
|
"route": {
|
|
|
|
"cluster": "just-methods.default.dc1.internal.11111111-2222-3333-4444-555555555555.consul"
|
|
|
|
}
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"match": {
|
|
|
|
"prefix": "/",
|
|
|
|
"headers": [
|
|
|
|
{
|
|
|
|
"name": "x-debug",
|
|
|
|
"exactMatch": "exact"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"name": ":method",
|
2020-07-09 22:04:51 +00:00
|
|
|
"safeRegexMatch": {
|
|
|
|
"googleRe2": {
|
|
|
|
|
|
|
|
},
|
|
|
|
"regex": "GET|PUT"
|
|
|
|
}
|
2020-04-14 21:30:00 +00:00
|
|
|
}
|
|
|
|
]
|
|
|
|
},
|
|
|
|
"route": {
|
|
|
|
"cluster": "hdr-exact-with-method.default.dc1.internal.11111111-2222-3333-4444-555555555555.consul"
|
|
|
|
}
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"match": {
|
|
|
|
"prefix": "/",
|
|
|
|
"queryParameters": [
|
|
|
|
{
|
|
|
|
"name": "secretparam1",
|
2020-07-09 22:04:51 +00:00
|
|
|
"stringMatch": {
|
|
|
|
"exact": "exact"
|
|
|
|
}
|
2020-04-14 21:30:00 +00:00
|
|
|
}
|
|
|
|
]
|
|
|
|
},
|
|
|
|
"route": {
|
|
|
|
"cluster": "prm-exact.default.dc1.internal.11111111-2222-3333-4444-555555555555.consul"
|
|
|
|
}
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"match": {
|
|
|
|
"prefix": "/",
|
|
|
|
"queryParameters": [
|
|
|
|
{
|
|
|
|
"name": "secretparam2",
|
2020-07-09 22:04:51 +00:00
|
|
|
"stringMatch": {
|
|
|
|
"safeRegex": {
|
|
|
|
"googleRe2": {
|
|
|
|
|
|
|
|
},
|
|
|
|
"regex": "regex"
|
|
|
|
}
|
|
|
|
}
|
2020-04-14 21:30:00 +00:00
|
|
|
}
|
|
|
|
]
|
|
|
|
},
|
|
|
|
"route": {
|
|
|
|
"cluster": "prm-regex.default.dc1.internal.11111111-2222-3333-4444-555555555555.consul"
|
|
|
|
}
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"match": {
|
|
|
|
"prefix": "/",
|
|
|
|
"queryParameters": [
|
|
|
|
{
|
2020-07-09 22:04:51 +00:00
|
|
|
"name": "secretparam3",
|
|
|
|
"presentMatch": true
|
2020-04-14 21:30:00 +00:00
|
|
|
}
|
|
|
|
]
|
|
|
|
},
|
|
|
|
"route": {
|
|
|
|
"cluster": "prm-present.default.dc1.internal.11111111-2222-3333-4444-555555555555.consul"
|
|
|
|
}
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"match": {
|
|
|
|
"prefix": "/"
|
|
|
|
},
|
|
|
|
"route": {
|
|
|
|
"cluster": "nil-match.default.dc1.internal.11111111-2222-3333-4444-555555555555.consul"
|
|
|
|
}
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"match": {
|
|
|
|
"prefix": "/"
|
|
|
|
},
|
|
|
|
"route": {
|
|
|
|
"cluster": "empty-match-1.default.dc1.internal.11111111-2222-3333-4444-555555555555.consul"
|
|
|
|
}
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"match": {
|
|
|
|
"prefix": "/"
|
|
|
|
},
|
|
|
|
"route": {
|
|
|
|
"cluster": "empty-match-2.default.dc1.internal.11111111-2222-3333-4444-555555555555.consul"
|
|
|
|
}
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"match": {
|
|
|
|
"prefix": "/prefix"
|
|
|
|
},
|
|
|
|
"route": {
|
|
|
|
"cluster": "prefix-rewrite-1.default.dc1.internal.11111111-2222-3333-4444-555555555555.consul",
|
|
|
|
"prefixRewrite": "/"
|
|
|
|
}
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"match": {
|
|
|
|
"prefix": "/prefix"
|
|
|
|
},
|
|
|
|
"route": {
|
|
|
|
"cluster": "prefix-rewrite-2.default.dc1.internal.11111111-2222-3333-4444-555555555555.consul",
|
|
|
|
"prefixRewrite": "/nested/newlocation"
|
|
|
|
}
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"match": {
|
|
|
|
"prefix": "/timeout"
|
|
|
|
},
|
|
|
|
"route": {
|
|
|
|
"cluster": "req-timeout.default.dc1.internal.11111111-2222-3333-4444-555555555555.consul",
|
|
|
|
"timeout": "33s"
|
|
|
|
}
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"match": {
|
|
|
|
"prefix": "/retry-connect"
|
|
|
|
},
|
|
|
|
"route": {
|
|
|
|
"cluster": "retry-connect.default.dc1.internal.11111111-2222-3333-4444-555555555555.consul",
|
|
|
|
"retryPolicy": {
|
|
|
|
"retryOn": "connect-failure",
|
|
|
|
"numRetries": 15
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
2022-10-05 17:06:44 +00:00
|
|
|
{
|
|
|
|
"match": {
|
|
|
|
"prefix": "/retry-reset"
|
|
|
|
},
|
|
|
|
"route": {
|
|
|
|
"cluster": "retry-reset.default.dc1.internal.11111111-2222-3333-4444-555555555555.consul",
|
|
|
|
"retryPolicy": {
|
|
|
|
"retryOn": "reset",
|
|
|
|
"numRetries": 15
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
2020-04-14 21:30:00 +00:00
|
|
|
{
|
|
|
|
"match": {
|
|
|
|
"prefix": "/retry-codes"
|
|
|
|
},
|
|
|
|
"route": {
|
|
|
|
"cluster": "retry-codes.default.dc1.internal.11111111-2222-3333-4444-555555555555.consul",
|
|
|
|
"retryPolicy": {
|
|
|
|
"retryOn": "retriable-status-codes",
|
|
|
|
"numRetries": 15,
|
|
|
|
"retriableStatusCodes": [
|
|
|
|
401,
|
|
|
|
409,
|
|
|
|
451
|
|
|
|
]
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"match": {
|
2022-10-05 17:06:44 +00:00
|
|
|
"prefix": "/retry-all"
|
2020-04-14 21:30:00 +00:00
|
|
|
},
|
|
|
|
"route": {
|
2022-10-05 17:06:44 +00:00
|
|
|
"cluster": "retry-all.default.dc1.internal.11111111-2222-3333-4444-555555555555.consul",
|
2020-04-14 21:30:00 +00:00
|
|
|
"retryPolicy": {
|
2022-10-05 17:06:44 +00:00
|
|
|
"retryOn": "5xx,gateway-error,reset,connect-failure,envoy-ratelimited,retriable-4xx,refused-stream,cancelled,deadline-exceeded,internal,resource-exhausted,unavailable,retriable-status-codes",
|
2020-04-14 21:30:00 +00:00
|
|
|
"retriableStatusCodes": [
|
|
|
|
401,
|
|
|
|
409,
|
|
|
|
451
|
|
|
|
]
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"match": {
|
|
|
|
"prefix": "/split-3-ways"
|
|
|
|
},
|
|
|
|
"route": {
|
|
|
|
"weightedClusters": {
|
|
|
|
"clusters": [
|
|
|
|
{
|
|
|
|
"name": "big-side.default.dc1.internal.11111111-2222-3333-4444-555555555555.consul",
|
|
|
|
"weight": 9550
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"name": "goldilocks-side.default.dc1.internal.11111111-2222-3333-4444-555555555555.consul",
|
|
|
|
"weight": 400
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"name": "lil-bit-side.default.dc1.internal.11111111-2222-3333-4444-555555555555.consul",
|
|
|
|
"weight": 50
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"totalWeight": 10000
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
2021-07-13 15:15:04 +00:00
|
|
|
{
|
|
|
|
"match": {
|
|
|
|
"path": "/header-manip"
|
|
|
|
},
|
|
|
|
"route": {
|
|
|
|
"cluster": "header-manip.default.dc1.internal.11111111-2222-3333-4444-555555555555.consul"
|
|
|
|
},
|
|
|
|
"requestHeadersToAdd": [
|
|
|
|
{
|
|
|
|
"header": {
|
|
|
|
"key": "request",
|
|
|
|
"value": "bar"
|
|
|
|
},
|
|
|
|
"append": true
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"header": {
|
|
|
|
"key": "bar",
|
|
|
|
"value": "baz"
|
|
|
|
},
|
|
|
|
"append": false
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"requestHeadersToRemove": [
|
|
|
|
"qux"
|
|
|
|
],
|
|
|
|
"responseHeadersToAdd": [
|
|
|
|
{
|
|
|
|
"header": {
|
|
|
|
"key": "response",
|
|
|
|
"value": "bar"
|
|
|
|
},
|
|
|
|
"append": true
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"header": {
|
|
|
|
"key": "bar",
|
|
|
|
"value": "baz"
|
|
|
|
},
|
|
|
|
"append": false
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"responseHeadersToRemove": [
|
|
|
|
"qux"
|
|
|
|
]
|
|
|
|
},
|
2020-04-14 21:30:00 +00:00
|
|
|
{
|
|
|
|
"match": {
|
|
|
|
"prefix": "/"
|
|
|
|
},
|
|
|
|
"route": {
|
|
|
|
"cluster": "db.default.dc1.internal.11111111-2222-3333-4444-555555555555.consul"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"validateClusters": true
|
|
|
|
}
|
|
|
|
],
|
2021-02-26 22:23:15 +00:00
|
|
|
"typeUrl": "type.googleapis.com/envoy.config.route.v3.RouteConfiguration",
|
2020-04-14 21:30:00 +00:00
|
|
|
"nonce": "00000001"
|
|
|
|
}
|