mirror of
https://github.com/status-im/consul.git
synced 2025-01-09 13:26:07 +00:00
0ec7bddb9a
* If a workload does not implement a port, it should not be included in the list of endpoints for the Envoy cluster for that port. * Adds tenancy tests for xds controller and xdsv2 resource generation, and adds all those files. * The original change in this PR was for filtering the list of endpoints by the port being routed to (bullet 1). Since I made changes to sidecarproxycontroller golden files, I realized some of the golden files were unused because of the tenancy changes, so when I deleted those, that broke xds controller tests which weren't correctly using tenancy. So when I fixed that, then the xdsv2 tests broke, so I added tenancy support there too. So now, from sidecarproxy controller -> xds controller -> xdsv2 we now have tenancy support and all the golden files are lined up.
67 lines
1.9 KiB
Plaintext
67 lines
1.9 KiB
Plaintext
{
|
|
"versionInfo": "00000001",
|
|
"resources": [
|
|
{
|
|
"@type": "type.googleapis.com/envoy.config.route.v3.RouteConfiguration",
|
|
"name": "foo/local/default/api-1:http:1.1.1.1:1234",
|
|
"virtualHosts": [
|
|
{
|
|
"name": "foo/local/default/api-1:http:1.1.1.1:1234",
|
|
"domains": [
|
|
"*"
|
|
],
|
|
"routes": [
|
|
{
|
|
"match": {
|
|
"prefix": "/split"
|
|
},
|
|
"route": {
|
|
"weightedClusters": {
|
|
"clusters": [
|
|
{
|
|
"name": "http.api-2.default.foo.dc1.internal-v1.foo.consul",
|
|
"weight": 60
|
|
},
|
|
{
|
|
"name": "http.api-1.default.foo.dc1.internal-v1.foo.consul",
|
|
"weight": 40
|
|
},
|
|
{
|
|
"name": "null_route_cluster",
|
|
"weight": 10
|
|
}
|
|
]
|
|
},
|
|
"timeout": "77s"
|
|
}
|
|
},
|
|
{
|
|
"match": {
|
|
"prefix": "/"
|
|
},
|
|
"route": {
|
|
"cluster": "http.api-1.default.foo.dc1.internal-v1.foo.consul",
|
|
"timeout": "606s",
|
|
"retryPolicy": {
|
|
"retryOn": "connect-failure",
|
|
"numRetries": 4
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"match": {
|
|
"prefix": "/"
|
|
},
|
|
"route": {
|
|
"cluster": "null_route_cluster"
|
|
}
|
|
}
|
|
]
|
|
}
|
|
],
|
|
"validateClusters": true
|
|
}
|
|
],
|
|
"typeUrl": "type.googleapis.com/envoy.config.route.v3.RouteConfiguration",
|
|
"nonce": "00000001"
|
|
} |