Add Envoy integration test for split-route SDS case

pull/10903/head
Paul Banks 3 years ago
parent ab27214a10
commit e0efb420f7

@ -40,6 +40,17 @@ config_entries {
cert_resource = "foo.example.com"
}
}
},
{
# Route to s2 on a differet domain with different cert
name = "s2"
hosts = ["www.example.com"]
tls {
sds {
cluster_name = "sds-cluster"
cert_resource = "www.example.com"
}
}
}
]
}

@ -13,7 +13,7 @@ services {
# http2_protocol_options:
#
# But that breaks 1.15 and 1.16. For now use this which is supported by
# all our supported versions# to avoid needing to setup different
# all our supported versions to avoid needing to setup different
# bootstrap based on the envoy version.
envoy_extra_static_clusters_json = <<EOF
{

@ -46,7 +46,7 @@ load helpers
# Make sure the Cert was the one SDS served and didn't just happen to have the
# right domain from Connect.
assert_cert_signed_by_ca /workdir/test-sds-server/certs/ca-root.crt \
localhost:9999 *.ingress.consul
localhost:9999 '*.ingress.consul'
}
@test "ingress should serve SDS-supplied cert for specific service" {
@ -55,3 +55,12 @@ load helpers
assert_cert_signed_by_ca /workdir/test-sds-server/certs/ca-root.crt \
localhost:9998 foo.example.com
}
@test "ingress should serve SDS-supplied cert for second specific service on same http listener" {
# Make sure the Cert was the one SDS served and didn't just happen to have the
# right domain from Connect. This also ensures that listeners work when we've
# had to split their routing tables due to different certs for different
# hostnames.
assert_cert_signed_by_ca /workdir/test-sds-server/certs/ca-root.crt \
localhost:9998 www.example.com
}

Loading…
Cancel
Save