-
Notifications
You must be signed in to change notification settings - Fork 4.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
213 additions
and
147 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
150 changes: 75 additions & 75 deletions
150
...controllers/xds/testdata/source/l4-multiple-workload-addresses-with-specific-ports.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
209 changes: 137 additions & 72 deletions
209
...ernal/controllers/xds/testdata/source/l4-multiple-workload-addresses-without-ports.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 |
---|---|---|
@@ -1,88 +1,153 @@ | ||
{ | ||
"proxyState": { | ||
"clusters": { | ||
"local_app:port1": { | ||
"endpointGroup": { | ||
"static": {} | ||
}, | ||
"name": "local_app:port1" | ||
} | ||
"clusters": { | ||
"local_app:port1": { | ||
"endpointGroup": { | ||
"static": {} | ||
}, | ||
"name": "local_app:port1" | ||
} | ||
}, | ||
"endpoints": { | ||
"local_app:port1": { | ||
"endpoints": [ | ||
{ | ||
"hostPort": { | ||
"host": "127.0.0.1", | ||
"port": 8080 | ||
} | ||
} | ||
] | ||
} | ||
}, | ||
"identity": { | ||
"name": "test-identity", | ||
"tenancy": { | ||
"namespace": "default", | ||
"partition": "default", | ||
"peerName": "local" | ||
}, | ||
"endpoints": { | ||
"local_app:port1": { | ||
"endpoints": [ | ||
{ | ||
"hostPort": { | ||
"host": "127.0.0.1", | ||
"port": 8080 | ||
"type": { | ||
"group": "auth", | ||
"groupVersion": "v2beta1", | ||
"kind": "WorkloadIdentity" | ||
} | ||
}, | ||
"listeners": [ | ||
{ | ||
"capabilities": [ | ||
"CAPABILITY_L4_TLS_INSPECTION" | ||
], | ||
"direction": "DIRECTION_INBOUND", | ||
"hostPort": { | ||
"host": "10.0.0.1", | ||
"port": 20000 | ||
}, | ||
"name": "public_listener", | ||
"routers": [ | ||
{ | ||
"inboundTls": { | ||
"inboundMesh": { | ||
"identityKey": "test-identity", | ||
"validationContext": { | ||
"trustBundlePeerNameKeys": [ | ||
"local" | ||
] | ||
} | ||
} | ||
}, | ||
"l4": { | ||
"cluster": { | ||
"name": "local_app:port1" | ||
}, | ||
"statPrefix": "public_listener", | ||
"trafficPermissions": {} | ||
}, | ||
"match": { | ||
"alpnProtocols": [ | ||
"consul~port1" | ||
] | ||
} | ||
] | ||
} | ||
} | ||
] | ||
} | ||
], | ||
"identity": { | ||
"name": "test-identity", | ||
"tenancy": { | ||
"namespace": "default", | ||
"partition": "default", | ||
"peerName": "local" | ||
}, | ||
"identity": { | ||
"name": "test-identity", | ||
"tenancy": { | ||
"namespace": "default", | ||
"partition": "default", | ||
"peerName": "local" | ||
"type": { | ||
"group": "auth", | ||
"groupVersion": "v2beta1", | ||
"kind": "WorkloadIdentity" | ||
} | ||
}, | ||
"listeners": [ | ||
{ | ||
"capabilities": [ | ||
"CAPABILITY_L4_TLS_INSPECTION" | ||
], | ||
"direction": "DIRECTION_INBOUND", | ||
"hostPort": { | ||
"host": "10.0.0.2", | ||
"port": 20000 | ||
}, | ||
"type": { | ||
"group": "auth", | ||
"groupVersion": "v2beta1", | ||
"kind": "WorkloadIdentity" | ||
} | ||
}, | ||
"listeners": [ | ||
{ | ||
"capabilities": [ | ||
"CAPABILITY_L4_TLS_INSPECTION" | ||
], | ||
"direction": "DIRECTION_INBOUND", | ||
"hostPort": { | ||
"host": "10.0.0.1", | ||
"port": 20000 | ||
}, | ||
"name": "public_listener", | ||
"routers": [ | ||
{ | ||
"inboundTls": { | ||
"inboundMesh": { | ||
"identityKey": "test-identity", | ||
"validationContext": { | ||
"trustBundlePeerNameKeys": [ | ||
"local" | ||
] | ||
} | ||
"name": "public_listener", | ||
"routers": [ | ||
{ | ||
"inboundTls": { | ||
"inboundMesh": { | ||
"identityKey": "test-identity", | ||
"validationContext": { | ||
"trustBundlePeerNameKeys": [ | ||
"local" | ||
] | ||
} | ||
} | ||
}, | ||
"l4": { | ||
"cluster": { | ||
"name": "local_app:port1" | ||
}, | ||
"l4": { | ||
"cluster": { | ||
"name": "local_app:port1" | ||
}, | ||
"statPrefix": "public_listener", | ||
"trafficPermissions": {} | ||
}, | ||
"match": { | ||
"alpnProtocols": [ | ||
"consul~port1" | ||
"statPrefix": "public_listener", | ||
"trafficPermissions": { | ||
"allowPermissions": [ | ||
{ | ||
"principals": [ | ||
{ | ||
"spiffe": { | ||
"regex": "^spiffe://foo.consul/ap/default/ns/default/identity/foo$" | ||
} | ||
} | ||
] | ||
} | ||
] | ||
} | ||
}, | ||
"match": { | ||
"alpnProtocols": [ | ||
"consul~port1" | ||
] | ||
} | ||
] | ||
} | ||
] | ||
}, | ||
"requiredLeafCertificates": { | ||
"test-identity": { | ||
"name": "test-identity", | ||
"namespace": "default", | ||
"partition": "default" | ||
} | ||
] | ||
} | ||
}, | ||
"requiredTrustBundles": { | ||
], | ||
"trustBundles": { | ||
"local": { | ||
"peer": "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" | ||
} | ||
} | ||
} |