-
Notifications
You must be signed in to change notification settings - Fork 4.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
single port destinations working except mixed destinations
- Loading branch information
Showing
5 changed files
with
803 additions
and
34 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
296 changes: 296 additions & 0 deletions
296
internal/mesh/internal/controllers/xds/testdata/destination/l4-multi-destination.golden
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,296 @@ | ||
{ | ||
"clusters": { | ||
"null_route_cluster": { | ||
"endpointGroup": { | ||
"static": { | ||
"config": { | ||
"connectTimeout": "10s" | ||
} | ||
} | ||
}, | ||
"name": "null_route_cluster" | ||
}, | ||
"tcp.api-1.default.dc1.internal.foo.consul": { | ||
"altStatName": "tcp.api-1.default.dc1.internal.foo.consul", | ||
"endpointGroup": { | ||
"dynamic": { | ||
"config": { | ||
"connectTimeout": "5s", | ||
"disablePanicThreshold": true | ||
}, | ||
"outboundTls": { | ||
"alpnProtocols": [ | ||
"consul~tcp" | ||
], | ||
"outboundMesh": { | ||
"identityKey": "test-identity", | ||
"sni": "api-1.default.dc1.internal.foo.consul", | ||
"validationContext": { | ||
"spiffeIds": [ | ||
"spiffe://foo.consul/ap/default/ns/default/identity/api1-identity" | ||
], | ||
"trustBundlePeerNameKey": "local" | ||
} | ||
} | ||
} | ||
} | ||
}, | ||
"name": "tcp.api-1.default.dc1.internal.foo.consul" | ||
}, | ||
"tcp.api-2.default.dc1.internal.foo.consul": { | ||
"altStatName": "tcp.api-2.default.dc1.internal.foo.consul", | ||
"endpointGroup": { | ||
"dynamic": { | ||
"config": { | ||
"connectTimeout": "5s", | ||
"disablePanicThreshold": true | ||
}, | ||
"outboundTls": { | ||
"alpnProtocols": [ | ||
"consul~tcp" | ||
], | ||
"outboundMesh": { | ||
"identityKey": "test-identity", | ||
"sni": "api-2.default.dc1.internal.foo.consul", | ||
"validationContext": { | ||
"spiffeIds": [ | ||
"spiffe://foo.consul/ap/default/ns/default/identity/api2-identity" | ||
], | ||
"trustBundlePeerNameKey": "local" | ||
} | ||
} | ||
} | ||
} | ||
}, | ||
"name": "tcp.api-2.default.dc1.internal.foo.consul" | ||
}, | ||
"tcp2.api-1.default.dc1.internal.foo.consul": { | ||
"altStatName": "tcp2.api-1.default.dc1.internal.foo.consul", | ||
"endpointGroup": { | ||
"dynamic": { | ||
"config": { | ||
"connectTimeout": "5s", | ||
"disablePanicThreshold": true | ||
}, | ||
"outboundTls": { | ||
"alpnProtocols": [ | ||
"consul~tcp2" | ||
], | ||
"outboundMesh": { | ||
"identityKey": "test-identity", | ||
"sni": "api-1.default.dc1.internal.foo.consul", | ||
"validationContext": { | ||
"spiffeIds": [ | ||
"spiffe://foo.consul/ap/default/ns/default/identity/api1-identity" | ||
], | ||
"trustBundlePeerNameKey": "local" | ||
} | ||
} | ||
} | ||
} | ||
}, | ||
"name": "tcp2.api-1.default.dc1.internal.foo.consul" | ||
}, | ||
"tcp2.api-2.default.dc1.internal.foo.consul": { | ||
"altStatName": "tcp2.api-2.default.dc1.internal.foo.consul", | ||
"endpointGroup": { | ||
"dynamic": { | ||
"config": { | ||
"connectTimeout": "5s", | ||
"disablePanicThreshold": true | ||
}, | ||
"outboundTls": { | ||
"alpnProtocols": [ | ||
"consul~tcp2" | ||
], | ||
"outboundMesh": { | ||
"identityKey": "test-identity", | ||
"sni": "api-2.default.dc1.internal.foo.consul", | ||
"validationContext": { | ||
"spiffeIds": [ | ||
"spiffe://foo.consul/ap/default/ns/default/identity/api2-identity" | ||
], | ||
"trustBundlePeerNameKey": "local" | ||
} | ||
} | ||
} | ||
} | ||
}, | ||
"name": "tcp2.api-2.default.dc1.internal.foo.consul" | ||
} | ||
}, | ||
"identity": { | ||
"name": "test-identity", | ||
"tenancy": { | ||
"namespace": "default", | ||
"partition": "default", | ||
"peerName": "local" | ||
}, | ||
"type": { | ||
"group": "auth", | ||
"groupVersion": "v2beta1", | ||
"kind": "WorkloadIdentity" | ||
} | ||
}, | ||
"listeners": [ | ||
{ | ||
"direction": "DIRECTION_OUTBOUND", | ||
"hostPort": { | ||
"host": "1.1.1.1", | ||
"port": 1234 | ||
}, | ||
"name": "default/local/default/api-1:tcp:1.1.1.1:1234", | ||
"routers": [ | ||
{ | ||
"l4": { | ||
"statPrefix": "upstream.tcp.api-1.default.default.dc1", | ||
"weightedClusters": { | ||
"clusters": [ | ||
{ | ||
"name": "tcp.api-2.default.dc1.internal.foo.consul", | ||
"weight": 60 | ||
}, | ||
{ | ||
"name": "tcp.api-1.default.dc1.internal.foo.consul", | ||
"weight": 40 | ||
}, | ||
{ | ||
"name": "null_route_cluster", | ||
"weight": 10 | ||
} | ||
] | ||
} | ||
} | ||
} | ||
] | ||
}, | ||
{ | ||
"direction": "DIRECTION_OUTBOUND", | ||
"name": "default/local/default/api-2:tcp:/path/to/socket", | ||
"routers": [ | ||
{ | ||
"l4": { | ||
"cluster": { | ||
"name": "tcp.api-2.default.dc1.internal.foo.consul" | ||
}, | ||
"statPrefix": "upstream.tcp.api-2.default.default.dc1" | ||
} | ||
} | ||
], | ||
"unixSocket": { | ||
"mode": "0666", | ||
"path": "/path/to/socket" | ||
} | ||
}, | ||
{ | ||
"direction": "DIRECTION_OUTBOUND", | ||
"hostPort": { | ||
"host": "1.1.1.1", | ||
"port": 2345 | ||
}, | ||
"name": "default/local/default/api-1:tcp2:1.1.1.1:2345", | ||
"routers": [ | ||
{ | ||
"l4": { | ||
"statPrefix": "upstream.tcp2.api-1.default.default.dc1", | ||
"weightedClusters": { | ||
"clusters": [ | ||
{ | ||
"name": "tcp2.api-2.default.dc1.internal.foo.consul", | ||
"weight": 60 | ||
}, | ||
{ | ||
"name": "tcp2.api-1.default.dc1.internal.foo.consul", | ||
"weight": 40 | ||
}, | ||
{ | ||
"name": "null_route_cluster", | ||
"weight": 10 | ||
} | ||
] | ||
} | ||
} | ||
} | ||
] | ||
}, | ||
{ | ||
"direction": "DIRECTION_OUTBOUND", | ||
"name": "default/local/default/api-2:tcp2:/path/to/socket", | ||
"routers": [ | ||
{ | ||
"l4": { | ||
"cluster": { | ||
"name": "tcp2.api-2.default.dc1.internal.foo.consul" | ||
}, | ||
"statPrefix": "upstream.tcp2.api-2.default.default.dc1" | ||
} | ||
} | ||
], | ||
"unixSocket": { | ||
"mode": "0666", | ||
"path": "/path/to/socket" | ||
} | ||
} | ||
], | ||
"endpoints": { | ||
"tcp.api-1.default.dc1.internal.foo.consul": { | ||
"endpoints": [ | ||
{ | ||
"healthStatus": "HEALTH_STATUS_HEALTHY", | ||
"hostPort": { | ||
"host": "10.1.1.1", | ||
"port": 20000 | ||
} | ||
} | ||
] | ||
}, | ||
"tcp.api-2.default.dc1.internal.foo.consul": { | ||
"endpoints": [ | ||
{ | ||
"healthStatus": "HEALTH_STATUS_HEALTHY", | ||
"hostPort": { | ||
"host": "10.1.1.1", | ||
"port": 20000 | ||
} | ||
} | ||
] | ||
}, | ||
"tcp2.api-1.default.dc1.internal.foo.consul": { | ||
"endpoints": [ | ||
{ | ||
"healthStatus": "HEALTH_STATUS_HEALTHY", | ||
"hostPort": { | ||
"host": "10.1.1.1", | ||
"port": 20000 | ||
} | ||
} | ||
] | ||
}, | ||
"tcp2.api-2.default.dc1.internal.foo.consul": { | ||
"endpoints": [ | ||
{ | ||
"healthStatus": "HEALTH_STATUS_HEALTHY", | ||
"hostPort": { | ||
"host": "10.1.1.1", | ||
"port": 20000 | ||
} | ||
} | ||
] | ||
} | ||
}, | ||
"trustBundles": { | ||
"local": { | ||
"roots": [ | ||
"some-root", | ||
"some-other-root" | ||
], | ||
"trustDomain": "some-trust-domain" | ||
} | ||
}, | ||
"leafCertificates": { | ||
"test-identity": { | ||
"cert": "-----BEGIN CERTIFICATE-----\nMIICDjCCAbWgAwIBAgIBAjAKBggqhkjOPQQDAjAUMRIwEAYDVQQDEwlUZXN0IENB\nIDEwHhcNMjMxMDE2MTYxMzI5WhcNMjMxMDE2MTYyMzI5WjAAMFkwEwYHKoZIzj0C\nAQYIKoZIzj0DAQcDQgAErErAIosDPheZQGbxFQ4hYC/e9Fi4MG9z/zjfCnCq/oK9\nta/bGT+5orZqTmdN/ICsKQDhykxZ2u/Xr6845zhcJaOCAQowggEGMA4GA1UdDwEB\n/wQEAwIDuDAdBgNVHSUEFjAUBggrBgEFBQcDAgYIKwYBBQUHAwEwDAYDVR0TAQH/\nBAIwADApBgNVHQ4EIgQg3ogXVz9cqaK2B6xdiJYMa5NtT0KkYv7BA2dR7h9EcwUw\nKwYDVR0jBCQwIoAgq+C1mPlPoGa4lt7sSft1goN5qPGyBIB/3mUHJZKSFY8wbwYD\nVR0RAQH/BGUwY4Zhc3BpZmZlOi8vMTExMTExMTEtMjIyMi0zMzMzLTQ0NDQtNTU1\nNTU1NTU1NTU1LmNvbnN1bC9hcC9kZWZhdWx0L25zL2RlZmF1bHQvaWRlbnRpdHkv\ndGVzdC1pZGVudGl0eTAKBggqhkjOPQQDAgNHADBEAiB6L+t5bzRrBPhiQYNeA7fF\nUCuLWrdjW4Xbv3SLg0IKMgIgfRC5hEx+DqzQxTCP4sexX3hVWMjKoWmHdwiUcg+K\n/IE=\n-----END CERTIFICATE-----\n", | ||
"key": "-----BEGIN EC PRIVATE KEY-----\nMHcCAQEEIFIFkTIL1iUV4O/RpveVHzHs7ZzhSkvYIzbdXDttz9EooAoGCCqGSM49\nAwEHoUQDQgAErErAIosDPheZQGbxFQ4hYC/e9Fi4MG9z/zjfCnCq/oK9ta/bGT+5\norZqTmdN/ICsKQDhykxZ2u/Xr6845zhcJQ==\n-----END EC PRIVATE KEY-----\n" | ||
} | ||
} | ||
} |
Oops, something went wrong.