-
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.
golden test input to xds controller tests for destinations
- Loading branch information
Showing
7 changed files
with
1,462 additions
and
25 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
182 changes: 182 additions & 0 deletions
182
.../controllers/xds/testdata/destination/l4-implicit-and-explicit-destinations-tproxy.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,182 @@ | ||
{ | ||
"clusters": { | ||
"original-destination": { | ||
"endpointGroup": { | ||
"passthrough": { | ||
"config": { | ||
"connectTimeout": "5s" | ||
} | ||
} | ||
}, | ||
"name": "original-destination" | ||
}, | ||
"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" | ||
} | ||
}, | ||
"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": { | ||
"cluster": { | ||
"name": "tcp.api-1.default.dc1.internal.foo.consul" | ||
}, | ||
"statPrefix": "upstream.tcp.api-1.default.default.dc1" | ||
} | ||
} | ||
] | ||
}, | ||
{ | ||
"capabilities": [ | ||
"CAPABILITY_TRANSPARENT" | ||
], | ||
"defaultRouter": { | ||
"l4": { | ||
"cluster": { | ||
"name": "original-destination" | ||
}, | ||
"statPrefix": "upstream.original-destination" | ||
} | ||
}, | ||
"direction": "DIRECTION_OUTBOUND", | ||
"hostPort": { | ||
"host": "127.0.0.1", | ||
"port": 15001 | ||
}, | ||
"name": "outbound_listener", | ||
"routers": [ | ||
{ | ||
"l4": { | ||
"cluster": { | ||
"name": "tcp.api-2.default.dc1.internal.foo.consul" | ||
}, | ||
"statPrefix": "upstream.tcp.api-2.default.default.dc1" | ||
}, | ||
"match": { | ||
"destinationPort": 7070, | ||
"prefixRanges": [ | ||
{ | ||
"addressPrefix": "2.2.2.2", | ||
"prefixLen": 32 | ||
}, | ||
{ | ||
"addressPrefix": "3.3.3.3", | ||
"prefixLen": 32 | ||
} | ||
] | ||
} | ||
} | ||
] | ||
} | ||
], | ||
"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 | ||
} | ||
} | ||
] | ||
} | ||
}, | ||
"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.