From 0c50b8e769e3ffc094846b28d132407e89c8b595 Mon Sep 17 00:00:00 2001 From: freddygv Date: Thu, 3 Sep 2020 08:57:48 -0600 Subject: [PATCH] Add explicit protocol overrides in tgw xds test cases --- agent/proxycfg/testing.go | 2 +- agent/xds/clusters.go | 8 +- agent/xds/clusters_test.go | 18 ++++ agent/xds/listeners_test.go | 16 +--- agent/xds/routes_test.go | 3 + ...ignore-extra-resolvers.envoy-1-12-x.golden | 32 +++++++ ...ignore-extra-resolvers.envoy-1-13-x.golden | 32 +++++++ ...ignore-extra-resolvers.envoy-1-14-x.golden | 32 +++++++ ...ignore-extra-resolvers.envoy-1-15-x.golden | 32 +++++++ ...ateway-service-subsets.envoy-1-12-x.golden | 32 +++++++ ...ateway-service-subsets.envoy-1-13-x.golden | 32 +++++++ ...ateway-service-subsets.envoy-1-14-x.golden | 32 +++++++ ...ateway-service-subsets.envoy-1-15-x.golden | 32 +++++++ ...teway-service-timeouts.envoy-1-12-x.golden | 34 ++++++- ...teway-service-timeouts.envoy-1-13-x.golden | 34 ++++++- ...teway-service-timeouts.envoy-1-14-x.golden | 34 ++++++- ...teway-service-timeouts.envoy-1-15-x.golden | 34 ++++++- ...stname-service-subsets.envoy-1-12-x.golden | 86 ++++++++++++++++++ ...stname-service-subsets.envoy-1-13-x.golden | 86 ++++++++++++++++++ ...stname-service-subsets.envoy-1-14-x.golden | 86 ++++++++++++++++++ ...stname-service-subsets.envoy-1-15-x.golden | 86 ++++++++++++++++++ ...ignore-extra-resolvers.envoy-1-12-x.golden | 56 ++++++++++++ ...ignore-extra-resolvers.envoy-1-13-x.golden | 56 ++++++++++++ ...ignore-extra-resolvers.envoy-1-14-x.golden | 56 ++++++++++++ ...ignore-extra-resolvers.envoy-1-15-x.golden | 56 ++++++++++++ ...ateway-service-subsets.envoy-1-12-x.golden | 88 +++++++++++++++++++ ...ateway-service-subsets.envoy-1-13-x.golden | 88 +++++++++++++++++++ ...ateway-service-subsets.envoy-1-14-x.golden | 88 +++++++++++++++++++ ...ateway-service-subsets.envoy-1-15-x.golden | 88 +++++++++++++++++++ ...m-and-tagged-addresses.envoy-1-12-x.golden | 70 +++++---------- ...m-and-tagged-addresses.envoy-1-13-x.golden | 70 +++++---------- ...m-and-tagged-addresses.envoy-1-14-x.golden | 70 +++++---------- ...m-and-tagged-addresses.envoy-1-15-x.golden | 70 +++++---------- ...ng-gateway-no-api-cert.envoy-1-12-x.golden | 35 +++----- ...ng-gateway-no-api-cert.envoy-1-13-x.golden | 35 +++----- ...ng-gateway-no-api-cert.envoy-1-14-x.golden | 35 +++----- ...ng-gateway-no-api-cert.envoy-1-15-x.golden | 35 +++----- .../terminating-gateway.envoy-1-12-x.golden | 35 +++----- .../terminating-gateway.envoy-1-13-x.golden | 35 +++----- .../terminating-gateway.envoy-1-14-x.golden | 35 +++----- .../terminating-gateway.envoy-1-15-x.golden | 35 +++----- 41 files changed, 1497 insertions(+), 422 deletions(-) diff --git a/agent/proxycfg/testing.go b/agent/proxycfg/testing.go index 2c6a0cd03..3dd4b6bd3 100644 --- a/agent/proxycfg/testing.go +++ b/agent/proxycfg/testing.go @@ -1883,7 +1883,7 @@ func testConfigSnapshotTerminatingGateway(t testing.T, populateServices bool) *C snap.TerminatingGateway.ServiceConfigs = map[structs.ServiceName]*structs.ServiceConfigResponse{ web: { - ProxyConfig: map[string]interface{}{"protocol": "http"}, + ProxyConfig: map[string]interface{}{"protocol": "tcp"}, }, api: { ProxyConfig: map[string]interface{}{"protocol": "tcp"}, diff --git a/agent/xds/clusters.go b/agent/xds/clusters.go index 4c061a86f..8491ab088 100644 --- a/agent/xds/clusters.go +++ b/agent/xds/clusters.go @@ -208,13 +208,13 @@ func (s *Server) makeGatewayServiceClusters(cfgSnap *proxycfg.ConfigSnapshot) ([ var loadBalancer *structs.EnvoyLBConfig - if hasResolver && resolver.LoadBalancer != nil { - loadBalancer = resolver.LoadBalancer.EnvoyConfig - - } else { + if !hasResolver { // Use a zero value resolver with no timeout and no subsets resolver = &structs.ServiceResolverConfigEntry{} } + if resolver.LoadBalancer != nil { + loadBalancer = resolver.LoadBalancer.EnvoyConfig + } // When making service clusters we only pass endpoints with hostnames if the kind is a terminating gateway // This is because the services a mesh gateway will route to are not external services and are not addressed by a hostname. diff --git a/agent/xds/clusters_test.go b/agent/xds/clusters_test.go index 76a23472e..024a4511b 100644 --- a/agent/xds/clusters_test.go +++ b/agent/xds/clusters_test.go @@ -527,6 +527,12 @@ func TestClustersFromSnapshot(t *testing.T) { }, }, } + snap.TerminatingGateway.ServiceConfigs[structs.NewServiceName("web", nil)] = &structs.ServiceConfigResponse{ + ProxyConfig: map[string]interface{}{"protocol": "http"}, + } + snap.TerminatingGateway.ServiceConfigs[structs.NewServiceName("cache", nil)] = &structs.ServiceConfigResponse{ + ProxyConfig: map[string]interface{}{"protocol": "http"}, + } }, }, { @@ -553,6 +559,12 @@ func TestClustersFromSnapshot(t *testing.T) { }, }, } + snap.TerminatingGateway.ServiceConfigs[structs.NewServiceName("api", nil)] = &structs.ServiceConfigResponse{ + ProxyConfig: map[string]interface{}{"protocol": "http"}, + } + snap.TerminatingGateway.ServiceConfigs[structs.NewServiceName("cache", nil)] = &structs.ServiceConfigResponse{ + ProxyConfig: map[string]interface{}{"protocol": "http"}, + } }, }, { @@ -589,6 +601,9 @@ func TestClustersFromSnapshot(t *testing.T) { }, }, } + snap.TerminatingGateway.ServiceConfigs[structs.NewServiceName("web", nil)] = &structs.ServiceConfigResponse{ + ProxyConfig: map[string]interface{}{"protocol": "http"}, + } }, }, { @@ -620,6 +635,9 @@ func TestClustersFromSnapshot(t *testing.T) { }, }, } + snap.TerminatingGateway.ServiceConfigs[structs.NewServiceName("web", nil)] = &structs.ServiceConfigResponse{ + ProxyConfig: map[string]interface{}{"protocol": "http"}, + } }, }, { diff --git a/agent/xds/listeners_test.go b/agent/xds/listeners_test.go index b972eaf5d..5b08ab637 100644 --- a/agent/xds/listeners_test.go +++ b/agent/xds/listeners_test.go @@ -436,19 +436,9 @@ func TestListenersFromSnapshot(t *testing.T) { }, }, }, - structs.NewServiceName("web", nil): { - Kind: structs.ServiceResolver, - Name: "web", - Subsets: map[string]structs.ServiceResolverSubset{ - "v1": { - Filter: "Service.Meta.version == 1", - }, - "v2": { - Filter: "Service.Meta.version == 2", - OnlyPassing: true, - }, - }, - }, + } + snap.TerminatingGateway.ServiceConfigs[structs.NewServiceName("web", nil)] = &structs.ServiceConfigResponse{ + ProxyConfig: map[string]interface{}{"protocol": "http"}, } }, }, diff --git a/agent/xds/routes_test.go b/agent/xds/routes_test.go index 2dd5ef38d..518102321 100644 --- a/agent/xds/routes_test.go +++ b/agent/xds/routes_test.go @@ -230,6 +230,9 @@ func TestRoutesFromSnapshot(t *testing.T) { }, }, } + snap.TerminatingGateway.ServiceConfigs[structs.NewServiceName("web", nil)] = &structs.ServiceConfigResponse{ + ProxyConfig: map[string]interface{}{"protocol": "http"}, + } }, }, } diff --git a/agent/xds/testdata/clusters/mesh-gateway-ignore-extra-resolvers.envoy-1-12-x.golden b/agent/xds/testdata/clusters/mesh-gateway-ignore-extra-resolvers.envoy-1-12-x.golden index 845881fd3..afc23f9ae 100644 --- a/agent/xds/testdata/clusters/mesh-gateway-ignore-extra-resolvers.envoy-1-12-x.golden +++ b/agent/xds/testdata/clusters/mesh-gateway-ignore-extra-resolvers.envoy-1-12-x.golden @@ -111,6 +111,38 @@ "connectTimeout": "5s", "outlierDetection": { + } + }, + { + "@type": "type.googleapis.com/envoy.api.v2.Cluster", + "name": "v1.bar.default.dc1.internal.11111111-2222-3333-4444-555555555555.consul", + "type": "EDS", + "edsClusterConfig": { + "edsConfig": { + "ads": { + + } + } + }, + "connectTimeout": "5s", + "outlierDetection": { + + } + }, + { + "@type": "type.googleapis.com/envoy.api.v2.Cluster", + "name": "v2.bar.default.dc1.internal.11111111-2222-3333-4444-555555555555.consul", + "type": "EDS", + "edsClusterConfig": { + "edsConfig": { + "ads": { + + } + } + }, + "connectTimeout": "5s", + "outlierDetection": { + } } ], diff --git a/agent/xds/testdata/clusters/mesh-gateway-ignore-extra-resolvers.envoy-1-13-x.golden b/agent/xds/testdata/clusters/mesh-gateway-ignore-extra-resolvers.envoy-1-13-x.golden index 845881fd3..afc23f9ae 100644 --- a/agent/xds/testdata/clusters/mesh-gateway-ignore-extra-resolvers.envoy-1-13-x.golden +++ b/agent/xds/testdata/clusters/mesh-gateway-ignore-extra-resolvers.envoy-1-13-x.golden @@ -111,6 +111,38 @@ "connectTimeout": "5s", "outlierDetection": { + } + }, + { + "@type": "type.googleapis.com/envoy.api.v2.Cluster", + "name": "v1.bar.default.dc1.internal.11111111-2222-3333-4444-555555555555.consul", + "type": "EDS", + "edsClusterConfig": { + "edsConfig": { + "ads": { + + } + } + }, + "connectTimeout": "5s", + "outlierDetection": { + + } + }, + { + "@type": "type.googleapis.com/envoy.api.v2.Cluster", + "name": "v2.bar.default.dc1.internal.11111111-2222-3333-4444-555555555555.consul", + "type": "EDS", + "edsClusterConfig": { + "edsConfig": { + "ads": { + + } + } + }, + "connectTimeout": "5s", + "outlierDetection": { + } } ], diff --git a/agent/xds/testdata/clusters/mesh-gateway-ignore-extra-resolvers.envoy-1-14-x.golden b/agent/xds/testdata/clusters/mesh-gateway-ignore-extra-resolvers.envoy-1-14-x.golden index 845881fd3..afc23f9ae 100644 --- a/agent/xds/testdata/clusters/mesh-gateway-ignore-extra-resolvers.envoy-1-14-x.golden +++ b/agent/xds/testdata/clusters/mesh-gateway-ignore-extra-resolvers.envoy-1-14-x.golden @@ -111,6 +111,38 @@ "connectTimeout": "5s", "outlierDetection": { + } + }, + { + "@type": "type.googleapis.com/envoy.api.v2.Cluster", + "name": "v1.bar.default.dc1.internal.11111111-2222-3333-4444-555555555555.consul", + "type": "EDS", + "edsClusterConfig": { + "edsConfig": { + "ads": { + + } + } + }, + "connectTimeout": "5s", + "outlierDetection": { + + } + }, + { + "@type": "type.googleapis.com/envoy.api.v2.Cluster", + "name": "v2.bar.default.dc1.internal.11111111-2222-3333-4444-555555555555.consul", + "type": "EDS", + "edsClusterConfig": { + "edsConfig": { + "ads": { + + } + } + }, + "connectTimeout": "5s", + "outlierDetection": { + } } ], diff --git a/agent/xds/testdata/clusters/mesh-gateway-ignore-extra-resolvers.envoy-1-15-x.golden b/agent/xds/testdata/clusters/mesh-gateway-ignore-extra-resolvers.envoy-1-15-x.golden index 845881fd3..afc23f9ae 100644 --- a/agent/xds/testdata/clusters/mesh-gateway-ignore-extra-resolvers.envoy-1-15-x.golden +++ b/agent/xds/testdata/clusters/mesh-gateway-ignore-extra-resolvers.envoy-1-15-x.golden @@ -111,6 +111,38 @@ "connectTimeout": "5s", "outlierDetection": { + } + }, + { + "@type": "type.googleapis.com/envoy.api.v2.Cluster", + "name": "v1.bar.default.dc1.internal.11111111-2222-3333-4444-555555555555.consul", + "type": "EDS", + "edsClusterConfig": { + "edsConfig": { + "ads": { + + } + } + }, + "connectTimeout": "5s", + "outlierDetection": { + + } + }, + { + "@type": "type.googleapis.com/envoy.api.v2.Cluster", + "name": "v2.bar.default.dc1.internal.11111111-2222-3333-4444-555555555555.consul", + "type": "EDS", + "edsClusterConfig": { + "edsConfig": { + "ads": { + + } + } + }, + "connectTimeout": "5s", + "outlierDetection": { + } } ], diff --git a/agent/xds/testdata/clusters/mesh-gateway-service-subsets.envoy-1-12-x.golden b/agent/xds/testdata/clusters/mesh-gateway-service-subsets.envoy-1-12-x.golden index 845881fd3..afc23f9ae 100644 --- a/agent/xds/testdata/clusters/mesh-gateway-service-subsets.envoy-1-12-x.golden +++ b/agent/xds/testdata/clusters/mesh-gateway-service-subsets.envoy-1-12-x.golden @@ -111,6 +111,38 @@ "connectTimeout": "5s", "outlierDetection": { + } + }, + { + "@type": "type.googleapis.com/envoy.api.v2.Cluster", + "name": "v1.bar.default.dc1.internal.11111111-2222-3333-4444-555555555555.consul", + "type": "EDS", + "edsClusterConfig": { + "edsConfig": { + "ads": { + + } + } + }, + "connectTimeout": "5s", + "outlierDetection": { + + } + }, + { + "@type": "type.googleapis.com/envoy.api.v2.Cluster", + "name": "v2.bar.default.dc1.internal.11111111-2222-3333-4444-555555555555.consul", + "type": "EDS", + "edsClusterConfig": { + "edsConfig": { + "ads": { + + } + } + }, + "connectTimeout": "5s", + "outlierDetection": { + } } ], diff --git a/agent/xds/testdata/clusters/mesh-gateway-service-subsets.envoy-1-13-x.golden b/agent/xds/testdata/clusters/mesh-gateway-service-subsets.envoy-1-13-x.golden index 845881fd3..afc23f9ae 100644 --- a/agent/xds/testdata/clusters/mesh-gateway-service-subsets.envoy-1-13-x.golden +++ b/agent/xds/testdata/clusters/mesh-gateway-service-subsets.envoy-1-13-x.golden @@ -111,6 +111,38 @@ "connectTimeout": "5s", "outlierDetection": { + } + }, + { + "@type": "type.googleapis.com/envoy.api.v2.Cluster", + "name": "v1.bar.default.dc1.internal.11111111-2222-3333-4444-555555555555.consul", + "type": "EDS", + "edsClusterConfig": { + "edsConfig": { + "ads": { + + } + } + }, + "connectTimeout": "5s", + "outlierDetection": { + + } + }, + { + "@type": "type.googleapis.com/envoy.api.v2.Cluster", + "name": "v2.bar.default.dc1.internal.11111111-2222-3333-4444-555555555555.consul", + "type": "EDS", + "edsClusterConfig": { + "edsConfig": { + "ads": { + + } + } + }, + "connectTimeout": "5s", + "outlierDetection": { + } } ], diff --git a/agent/xds/testdata/clusters/mesh-gateway-service-subsets.envoy-1-14-x.golden b/agent/xds/testdata/clusters/mesh-gateway-service-subsets.envoy-1-14-x.golden index 845881fd3..afc23f9ae 100644 --- a/agent/xds/testdata/clusters/mesh-gateway-service-subsets.envoy-1-14-x.golden +++ b/agent/xds/testdata/clusters/mesh-gateway-service-subsets.envoy-1-14-x.golden @@ -111,6 +111,38 @@ "connectTimeout": "5s", "outlierDetection": { + } + }, + { + "@type": "type.googleapis.com/envoy.api.v2.Cluster", + "name": "v1.bar.default.dc1.internal.11111111-2222-3333-4444-555555555555.consul", + "type": "EDS", + "edsClusterConfig": { + "edsConfig": { + "ads": { + + } + } + }, + "connectTimeout": "5s", + "outlierDetection": { + + } + }, + { + "@type": "type.googleapis.com/envoy.api.v2.Cluster", + "name": "v2.bar.default.dc1.internal.11111111-2222-3333-4444-555555555555.consul", + "type": "EDS", + "edsClusterConfig": { + "edsConfig": { + "ads": { + + } + } + }, + "connectTimeout": "5s", + "outlierDetection": { + } } ], diff --git a/agent/xds/testdata/clusters/mesh-gateway-service-subsets.envoy-1-15-x.golden b/agent/xds/testdata/clusters/mesh-gateway-service-subsets.envoy-1-15-x.golden index 845881fd3..afc23f9ae 100644 --- a/agent/xds/testdata/clusters/mesh-gateway-service-subsets.envoy-1-15-x.golden +++ b/agent/xds/testdata/clusters/mesh-gateway-service-subsets.envoy-1-15-x.golden @@ -111,6 +111,38 @@ "connectTimeout": "5s", "outlierDetection": { + } + }, + { + "@type": "type.googleapis.com/envoy.api.v2.Cluster", + "name": "v1.bar.default.dc1.internal.11111111-2222-3333-4444-555555555555.consul", + "type": "EDS", + "edsClusterConfig": { + "edsConfig": { + "ads": { + + } + } + }, + "connectTimeout": "5s", + "outlierDetection": { + + } + }, + { + "@type": "type.googleapis.com/envoy.api.v2.Cluster", + "name": "v2.bar.default.dc1.internal.11111111-2222-3333-4444-555555555555.consul", + "type": "EDS", + "edsClusterConfig": { + "edsConfig": { + "ads": { + + } + } + }, + "connectTimeout": "5s", + "outlierDetection": { + } } ], diff --git a/agent/xds/testdata/clusters/mesh-gateway-service-timeouts.envoy-1-12-x.golden b/agent/xds/testdata/clusters/mesh-gateway-service-timeouts.envoy-1-12-x.golden index 845881fd3..bf2d50142 100644 --- a/agent/xds/testdata/clusters/mesh-gateway-service-timeouts.envoy-1-12-x.golden +++ b/agent/xds/testdata/clusters/mesh-gateway-service-timeouts.envoy-1-12-x.golden @@ -12,7 +12,7 @@ } } }, - "connectTimeout": "5s", + "connectTimeout": "10s", "outlierDetection": { } @@ -111,6 +111,38 @@ "connectTimeout": "5s", "outlierDetection": { + } + }, + { + "@type": "type.googleapis.com/envoy.api.v2.Cluster", + "name": "v1.bar.default.dc1.internal.11111111-2222-3333-4444-555555555555.consul", + "type": "EDS", + "edsClusterConfig": { + "edsConfig": { + "ads": { + + } + } + }, + "connectTimeout": "10s", + "outlierDetection": { + + } + }, + { + "@type": "type.googleapis.com/envoy.api.v2.Cluster", + "name": "v2.bar.default.dc1.internal.11111111-2222-3333-4444-555555555555.consul", + "type": "EDS", + "edsClusterConfig": { + "edsConfig": { + "ads": { + + } + } + }, + "connectTimeout": "10s", + "outlierDetection": { + } } ], diff --git a/agent/xds/testdata/clusters/mesh-gateway-service-timeouts.envoy-1-13-x.golden b/agent/xds/testdata/clusters/mesh-gateway-service-timeouts.envoy-1-13-x.golden index 845881fd3..bf2d50142 100644 --- a/agent/xds/testdata/clusters/mesh-gateway-service-timeouts.envoy-1-13-x.golden +++ b/agent/xds/testdata/clusters/mesh-gateway-service-timeouts.envoy-1-13-x.golden @@ -12,7 +12,7 @@ } } }, - "connectTimeout": "5s", + "connectTimeout": "10s", "outlierDetection": { } @@ -111,6 +111,38 @@ "connectTimeout": "5s", "outlierDetection": { + } + }, + { + "@type": "type.googleapis.com/envoy.api.v2.Cluster", + "name": "v1.bar.default.dc1.internal.11111111-2222-3333-4444-555555555555.consul", + "type": "EDS", + "edsClusterConfig": { + "edsConfig": { + "ads": { + + } + } + }, + "connectTimeout": "10s", + "outlierDetection": { + + } + }, + { + "@type": "type.googleapis.com/envoy.api.v2.Cluster", + "name": "v2.bar.default.dc1.internal.11111111-2222-3333-4444-555555555555.consul", + "type": "EDS", + "edsClusterConfig": { + "edsConfig": { + "ads": { + + } + } + }, + "connectTimeout": "10s", + "outlierDetection": { + } } ], diff --git a/agent/xds/testdata/clusters/mesh-gateway-service-timeouts.envoy-1-14-x.golden b/agent/xds/testdata/clusters/mesh-gateway-service-timeouts.envoy-1-14-x.golden index 845881fd3..bf2d50142 100644 --- a/agent/xds/testdata/clusters/mesh-gateway-service-timeouts.envoy-1-14-x.golden +++ b/agent/xds/testdata/clusters/mesh-gateway-service-timeouts.envoy-1-14-x.golden @@ -12,7 +12,7 @@ } } }, - "connectTimeout": "5s", + "connectTimeout": "10s", "outlierDetection": { } @@ -111,6 +111,38 @@ "connectTimeout": "5s", "outlierDetection": { + } + }, + { + "@type": "type.googleapis.com/envoy.api.v2.Cluster", + "name": "v1.bar.default.dc1.internal.11111111-2222-3333-4444-555555555555.consul", + "type": "EDS", + "edsClusterConfig": { + "edsConfig": { + "ads": { + + } + } + }, + "connectTimeout": "10s", + "outlierDetection": { + + } + }, + { + "@type": "type.googleapis.com/envoy.api.v2.Cluster", + "name": "v2.bar.default.dc1.internal.11111111-2222-3333-4444-555555555555.consul", + "type": "EDS", + "edsClusterConfig": { + "edsConfig": { + "ads": { + + } + } + }, + "connectTimeout": "10s", + "outlierDetection": { + } } ], diff --git a/agent/xds/testdata/clusters/mesh-gateway-service-timeouts.envoy-1-15-x.golden b/agent/xds/testdata/clusters/mesh-gateway-service-timeouts.envoy-1-15-x.golden index 845881fd3..bf2d50142 100644 --- a/agent/xds/testdata/clusters/mesh-gateway-service-timeouts.envoy-1-15-x.golden +++ b/agent/xds/testdata/clusters/mesh-gateway-service-timeouts.envoy-1-15-x.golden @@ -12,7 +12,7 @@ } } }, - "connectTimeout": "5s", + "connectTimeout": "10s", "outlierDetection": { } @@ -111,6 +111,38 @@ "connectTimeout": "5s", "outlierDetection": { + } + }, + { + "@type": "type.googleapis.com/envoy.api.v2.Cluster", + "name": "v1.bar.default.dc1.internal.11111111-2222-3333-4444-555555555555.consul", + "type": "EDS", + "edsClusterConfig": { + "edsConfig": { + "ads": { + + } + } + }, + "connectTimeout": "10s", + "outlierDetection": { + + } + }, + { + "@type": "type.googleapis.com/envoy.api.v2.Cluster", + "name": "v2.bar.default.dc1.internal.11111111-2222-3333-4444-555555555555.consul", + "type": "EDS", + "edsClusterConfig": { + "edsConfig": { + "ads": { + + } + } + }, + "connectTimeout": "10s", + "outlierDetection": { + } } ], diff --git a/agent/xds/testdata/clusters/terminating-gateway-hostname-service-subsets.envoy-1-12-x.golden b/agent/xds/testdata/clusters/terminating-gateway-hostname-service-subsets.envoy-1-12-x.golden index 27b1ddc6c..44bd0fd5f 100644 --- a/agent/xds/testdata/clusters/terminating-gateway-hostname-service-subsets.envoy-1-12-x.golden +++ b/agent/xds/testdata/clusters/terminating-gateway-hostname-service-subsets.envoy-1-12-x.golden @@ -1,6 +1,60 @@ { "versionInfo": "00000001", "resources": [ + { + "@type": "type.googleapis.com/envoy.api.v2.Cluster", + "name": "alt.api.default.dc1.internal.11111111-2222-3333-4444-555555555555.consul", + "type": "LOGICAL_DNS", + "connectTimeout": "5s", + "loadAssignment": { + "clusterName": "alt.api.default.dc1.internal.11111111-2222-3333-4444-555555555555.consul", + "endpoints": [ + { + "lbEndpoints": [ + { + "endpoint": { + "address": { + "socketAddress": { + "address": "api.altdomain", + "portValue": 8081 + } + } + }, + "healthStatus": "HEALTHY", + "loadBalancingWeight": 1 + } + ] + } + ] + }, + "tlsContext": { + "commonTlsContext": { + "tlsParams": { + + }, + "tlsCertificates": [ + { + "certificateChain": { + "filename": "api.cert.pem" + }, + "privateKey": { + "filename": "api.key.pem" + } + } + ], + "validationContext": { + "trustedCa": { + "filename": "ca.cert.pem" + } + } + } + }, + "dnsRefreshRate": "10s", + "dnsLookupFamily": "V4_ONLY", + "outlierDetection": { + + } + }, { "@type": "type.googleapis.com/envoy.api.v2.Cluster", "name": "api.default.dc1.internal.11111111-2222-3333-4444-555555555555.consul", @@ -119,6 +173,38 @@ } }, + { + "@type": "type.googleapis.com/envoy.api.v2.Cluster", + "name": "prod.cache.default.dc1.internal.11111111-2222-3333-4444-555555555555.consul", + "type": "LOGICAL_DNS", + "connectTimeout": "5s", + "loadAssignment": { + "clusterName": "prod.cache.default.dc1.internal.11111111-2222-3333-4444-555555555555.consul", + "endpoints": [ + { + "lbEndpoints": [ + { + "endpoint": { + "address": { + "socketAddress": { + "address": "cache.mydomain", + "portValue": 8081 + } + } + }, + "healthStatus": "UNHEALTHY", + "loadBalancingWeight": 1 + } + ] + } + ] + }, + "dnsRefreshRate": "10s", + "dnsLookupFamily": "V4_ONLY", + "outlierDetection": { + + } + }, { "@type": "type.googleapis.com/envoy.api.v2.Cluster", "name": "web.default.dc1.internal.11111111-2222-3333-4444-555555555555.consul", diff --git a/agent/xds/testdata/clusters/terminating-gateway-hostname-service-subsets.envoy-1-13-x.golden b/agent/xds/testdata/clusters/terminating-gateway-hostname-service-subsets.envoy-1-13-x.golden index 27b1ddc6c..44bd0fd5f 100644 --- a/agent/xds/testdata/clusters/terminating-gateway-hostname-service-subsets.envoy-1-13-x.golden +++ b/agent/xds/testdata/clusters/terminating-gateway-hostname-service-subsets.envoy-1-13-x.golden @@ -1,6 +1,60 @@ { "versionInfo": "00000001", "resources": [ + { + "@type": "type.googleapis.com/envoy.api.v2.Cluster", + "name": "alt.api.default.dc1.internal.11111111-2222-3333-4444-555555555555.consul", + "type": "LOGICAL_DNS", + "connectTimeout": "5s", + "loadAssignment": { + "clusterName": "alt.api.default.dc1.internal.11111111-2222-3333-4444-555555555555.consul", + "endpoints": [ + { + "lbEndpoints": [ + { + "endpoint": { + "address": { + "socketAddress": { + "address": "api.altdomain", + "portValue": 8081 + } + } + }, + "healthStatus": "HEALTHY", + "loadBalancingWeight": 1 + } + ] + } + ] + }, + "tlsContext": { + "commonTlsContext": { + "tlsParams": { + + }, + "tlsCertificates": [ + { + "certificateChain": { + "filename": "api.cert.pem" + }, + "privateKey": { + "filename": "api.key.pem" + } + } + ], + "validationContext": { + "trustedCa": { + "filename": "ca.cert.pem" + } + } + } + }, + "dnsRefreshRate": "10s", + "dnsLookupFamily": "V4_ONLY", + "outlierDetection": { + + } + }, { "@type": "type.googleapis.com/envoy.api.v2.Cluster", "name": "api.default.dc1.internal.11111111-2222-3333-4444-555555555555.consul", @@ -119,6 +173,38 @@ } }, + { + "@type": "type.googleapis.com/envoy.api.v2.Cluster", + "name": "prod.cache.default.dc1.internal.11111111-2222-3333-4444-555555555555.consul", + "type": "LOGICAL_DNS", + "connectTimeout": "5s", + "loadAssignment": { + "clusterName": "prod.cache.default.dc1.internal.11111111-2222-3333-4444-555555555555.consul", + "endpoints": [ + { + "lbEndpoints": [ + { + "endpoint": { + "address": { + "socketAddress": { + "address": "cache.mydomain", + "portValue": 8081 + } + } + }, + "healthStatus": "UNHEALTHY", + "loadBalancingWeight": 1 + } + ] + } + ] + }, + "dnsRefreshRate": "10s", + "dnsLookupFamily": "V4_ONLY", + "outlierDetection": { + + } + }, { "@type": "type.googleapis.com/envoy.api.v2.Cluster", "name": "web.default.dc1.internal.11111111-2222-3333-4444-555555555555.consul", diff --git a/agent/xds/testdata/clusters/terminating-gateway-hostname-service-subsets.envoy-1-14-x.golden b/agent/xds/testdata/clusters/terminating-gateway-hostname-service-subsets.envoy-1-14-x.golden index 27b1ddc6c..44bd0fd5f 100644 --- a/agent/xds/testdata/clusters/terminating-gateway-hostname-service-subsets.envoy-1-14-x.golden +++ b/agent/xds/testdata/clusters/terminating-gateway-hostname-service-subsets.envoy-1-14-x.golden @@ -1,6 +1,60 @@ { "versionInfo": "00000001", "resources": [ + { + "@type": "type.googleapis.com/envoy.api.v2.Cluster", + "name": "alt.api.default.dc1.internal.11111111-2222-3333-4444-555555555555.consul", + "type": "LOGICAL_DNS", + "connectTimeout": "5s", + "loadAssignment": { + "clusterName": "alt.api.default.dc1.internal.11111111-2222-3333-4444-555555555555.consul", + "endpoints": [ + { + "lbEndpoints": [ + { + "endpoint": { + "address": { + "socketAddress": { + "address": "api.altdomain", + "portValue": 8081 + } + } + }, + "healthStatus": "HEALTHY", + "loadBalancingWeight": 1 + } + ] + } + ] + }, + "tlsContext": { + "commonTlsContext": { + "tlsParams": { + + }, + "tlsCertificates": [ + { + "certificateChain": { + "filename": "api.cert.pem" + }, + "privateKey": { + "filename": "api.key.pem" + } + } + ], + "validationContext": { + "trustedCa": { + "filename": "ca.cert.pem" + } + } + } + }, + "dnsRefreshRate": "10s", + "dnsLookupFamily": "V4_ONLY", + "outlierDetection": { + + } + }, { "@type": "type.googleapis.com/envoy.api.v2.Cluster", "name": "api.default.dc1.internal.11111111-2222-3333-4444-555555555555.consul", @@ -119,6 +173,38 @@ } }, + { + "@type": "type.googleapis.com/envoy.api.v2.Cluster", + "name": "prod.cache.default.dc1.internal.11111111-2222-3333-4444-555555555555.consul", + "type": "LOGICAL_DNS", + "connectTimeout": "5s", + "loadAssignment": { + "clusterName": "prod.cache.default.dc1.internal.11111111-2222-3333-4444-555555555555.consul", + "endpoints": [ + { + "lbEndpoints": [ + { + "endpoint": { + "address": { + "socketAddress": { + "address": "cache.mydomain", + "portValue": 8081 + } + } + }, + "healthStatus": "UNHEALTHY", + "loadBalancingWeight": 1 + } + ] + } + ] + }, + "dnsRefreshRate": "10s", + "dnsLookupFamily": "V4_ONLY", + "outlierDetection": { + + } + }, { "@type": "type.googleapis.com/envoy.api.v2.Cluster", "name": "web.default.dc1.internal.11111111-2222-3333-4444-555555555555.consul", diff --git a/agent/xds/testdata/clusters/terminating-gateway-hostname-service-subsets.envoy-1-15-x.golden b/agent/xds/testdata/clusters/terminating-gateway-hostname-service-subsets.envoy-1-15-x.golden index 27b1ddc6c..44bd0fd5f 100644 --- a/agent/xds/testdata/clusters/terminating-gateway-hostname-service-subsets.envoy-1-15-x.golden +++ b/agent/xds/testdata/clusters/terminating-gateway-hostname-service-subsets.envoy-1-15-x.golden @@ -1,6 +1,60 @@ { "versionInfo": "00000001", "resources": [ + { + "@type": "type.googleapis.com/envoy.api.v2.Cluster", + "name": "alt.api.default.dc1.internal.11111111-2222-3333-4444-555555555555.consul", + "type": "LOGICAL_DNS", + "connectTimeout": "5s", + "loadAssignment": { + "clusterName": "alt.api.default.dc1.internal.11111111-2222-3333-4444-555555555555.consul", + "endpoints": [ + { + "lbEndpoints": [ + { + "endpoint": { + "address": { + "socketAddress": { + "address": "api.altdomain", + "portValue": 8081 + } + } + }, + "healthStatus": "HEALTHY", + "loadBalancingWeight": 1 + } + ] + } + ] + }, + "tlsContext": { + "commonTlsContext": { + "tlsParams": { + + }, + "tlsCertificates": [ + { + "certificateChain": { + "filename": "api.cert.pem" + }, + "privateKey": { + "filename": "api.key.pem" + } + } + ], + "validationContext": { + "trustedCa": { + "filename": "ca.cert.pem" + } + } + } + }, + "dnsRefreshRate": "10s", + "dnsLookupFamily": "V4_ONLY", + "outlierDetection": { + + } + }, { "@type": "type.googleapis.com/envoy.api.v2.Cluster", "name": "api.default.dc1.internal.11111111-2222-3333-4444-555555555555.consul", @@ -119,6 +173,38 @@ } }, + { + "@type": "type.googleapis.com/envoy.api.v2.Cluster", + "name": "prod.cache.default.dc1.internal.11111111-2222-3333-4444-555555555555.consul", + "type": "LOGICAL_DNS", + "connectTimeout": "5s", + "loadAssignment": { + "clusterName": "prod.cache.default.dc1.internal.11111111-2222-3333-4444-555555555555.consul", + "endpoints": [ + { + "lbEndpoints": [ + { + "endpoint": { + "address": { + "socketAddress": { + "address": "cache.mydomain", + "portValue": 8081 + } + } + }, + "healthStatus": "UNHEALTHY", + "loadBalancingWeight": 1 + } + ] + } + ] + }, + "dnsRefreshRate": "10s", + "dnsLookupFamily": "V4_ONLY", + "outlierDetection": { + + } + }, { "@type": "type.googleapis.com/envoy.api.v2.Cluster", "name": "web.default.dc1.internal.11111111-2222-3333-4444-555555555555.consul", diff --git a/agent/xds/testdata/clusters/terminating-gateway-ignore-extra-resolvers.envoy-1-12-x.golden b/agent/xds/testdata/clusters/terminating-gateway-ignore-extra-resolvers.envoy-1-12-x.golden index 27b1ddc6c..f9c7336e6 100644 --- a/agent/xds/testdata/clusters/terminating-gateway-ignore-extra-resolvers.envoy-1-12-x.golden +++ b/agent/xds/testdata/clusters/terminating-gateway-ignore-extra-resolvers.envoy-1-12-x.golden @@ -119,6 +119,62 @@ } }, + { + "@type": "type.googleapis.com/envoy.api.v2.Cluster", + "name": "v1.web.default.dc1.internal.11111111-2222-3333-4444-555555555555.consul", + "type": "EDS", + "edsClusterConfig": { + "edsConfig": { + "ads": { + + } + } + }, + "connectTimeout": "5s", + "tlsContext": { + "commonTlsContext": { + "tlsParams": { + + }, + "validationContext": { + "trustedCa": { + "filename": "ca.cert.pem" + } + } + } + }, + "outlierDetection": { + + } + }, + { + "@type": "type.googleapis.com/envoy.api.v2.Cluster", + "name": "v2.web.default.dc1.internal.11111111-2222-3333-4444-555555555555.consul", + "type": "EDS", + "edsClusterConfig": { + "edsConfig": { + "ads": { + + } + } + }, + "connectTimeout": "5s", + "tlsContext": { + "commonTlsContext": { + "tlsParams": { + + }, + "validationContext": { + "trustedCa": { + "filename": "ca.cert.pem" + } + } + } + }, + "outlierDetection": { + + } + }, { "@type": "type.googleapis.com/envoy.api.v2.Cluster", "name": "web.default.dc1.internal.11111111-2222-3333-4444-555555555555.consul", diff --git a/agent/xds/testdata/clusters/terminating-gateway-ignore-extra-resolvers.envoy-1-13-x.golden b/agent/xds/testdata/clusters/terminating-gateway-ignore-extra-resolvers.envoy-1-13-x.golden index 27b1ddc6c..f9c7336e6 100644 --- a/agent/xds/testdata/clusters/terminating-gateway-ignore-extra-resolvers.envoy-1-13-x.golden +++ b/agent/xds/testdata/clusters/terminating-gateway-ignore-extra-resolvers.envoy-1-13-x.golden @@ -119,6 +119,62 @@ } }, + { + "@type": "type.googleapis.com/envoy.api.v2.Cluster", + "name": "v1.web.default.dc1.internal.11111111-2222-3333-4444-555555555555.consul", + "type": "EDS", + "edsClusterConfig": { + "edsConfig": { + "ads": { + + } + } + }, + "connectTimeout": "5s", + "tlsContext": { + "commonTlsContext": { + "tlsParams": { + + }, + "validationContext": { + "trustedCa": { + "filename": "ca.cert.pem" + } + } + } + }, + "outlierDetection": { + + } + }, + { + "@type": "type.googleapis.com/envoy.api.v2.Cluster", + "name": "v2.web.default.dc1.internal.11111111-2222-3333-4444-555555555555.consul", + "type": "EDS", + "edsClusterConfig": { + "edsConfig": { + "ads": { + + } + } + }, + "connectTimeout": "5s", + "tlsContext": { + "commonTlsContext": { + "tlsParams": { + + }, + "validationContext": { + "trustedCa": { + "filename": "ca.cert.pem" + } + } + } + }, + "outlierDetection": { + + } + }, { "@type": "type.googleapis.com/envoy.api.v2.Cluster", "name": "web.default.dc1.internal.11111111-2222-3333-4444-555555555555.consul", diff --git a/agent/xds/testdata/clusters/terminating-gateway-ignore-extra-resolvers.envoy-1-14-x.golden b/agent/xds/testdata/clusters/terminating-gateway-ignore-extra-resolvers.envoy-1-14-x.golden index 27b1ddc6c..f9c7336e6 100644 --- a/agent/xds/testdata/clusters/terminating-gateway-ignore-extra-resolvers.envoy-1-14-x.golden +++ b/agent/xds/testdata/clusters/terminating-gateway-ignore-extra-resolvers.envoy-1-14-x.golden @@ -119,6 +119,62 @@ } }, + { + "@type": "type.googleapis.com/envoy.api.v2.Cluster", + "name": "v1.web.default.dc1.internal.11111111-2222-3333-4444-555555555555.consul", + "type": "EDS", + "edsClusterConfig": { + "edsConfig": { + "ads": { + + } + } + }, + "connectTimeout": "5s", + "tlsContext": { + "commonTlsContext": { + "tlsParams": { + + }, + "validationContext": { + "trustedCa": { + "filename": "ca.cert.pem" + } + } + } + }, + "outlierDetection": { + + } + }, + { + "@type": "type.googleapis.com/envoy.api.v2.Cluster", + "name": "v2.web.default.dc1.internal.11111111-2222-3333-4444-555555555555.consul", + "type": "EDS", + "edsClusterConfig": { + "edsConfig": { + "ads": { + + } + } + }, + "connectTimeout": "5s", + "tlsContext": { + "commonTlsContext": { + "tlsParams": { + + }, + "validationContext": { + "trustedCa": { + "filename": "ca.cert.pem" + } + } + } + }, + "outlierDetection": { + + } + }, { "@type": "type.googleapis.com/envoy.api.v2.Cluster", "name": "web.default.dc1.internal.11111111-2222-3333-4444-555555555555.consul", diff --git a/agent/xds/testdata/clusters/terminating-gateway-ignore-extra-resolvers.envoy-1-15-x.golden b/agent/xds/testdata/clusters/terminating-gateway-ignore-extra-resolvers.envoy-1-15-x.golden index 27b1ddc6c..f9c7336e6 100644 --- a/agent/xds/testdata/clusters/terminating-gateway-ignore-extra-resolvers.envoy-1-15-x.golden +++ b/agent/xds/testdata/clusters/terminating-gateway-ignore-extra-resolvers.envoy-1-15-x.golden @@ -119,6 +119,62 @@ } }, + { + "@type": "type.googleapis.com/envoy.api.v2.Cluster", + "name": "v1.web.default.dc1.internal.11111111-2222-3333-4444-555555555555.consul", + "type": "EDS", + "edsClusterConfig": { + "edsConfig": { + "ads": { + + } + } + }, + "connectTimeout": "5s", + "tlsContext": { + "commonTlsContext": { + "tlsParams": { + + }, + "validationContext": { + "trustedCa": { + "filename": "ca.cert.pem" + } + } + } + }, + "outlierDetection": { + + } + }, + { + "@type": "type.googleapis.com/envoy.api.v2.Cluster", + "name": "v2.web.default.dc1.internal.11111111-2222-3333-4444-555555555555.consul", + "type": "EDS", + "edsClusterConfig": { + "edsConfig": { + "ads": { + + } + } + }, + "connectTimeout": "5s", + "tlsContext": { + "commonTlsContext": { + "tlsParams": { + + }, + "validationContext": { + "trustedCa": { + "filename": "ca.cert.pem" + } + } + } + }, + "outlierDetection": { + + } + }, { "@type": "type.googleapis.com/envoy.api.v2.Cluster", "name": "web.default.dc1.internal.11111111-2222-3333-4444-555555555555.consul", diff --git a/agent/xds/testdata/clusters/terminating-gateway-service-subsets.envoy-1-12-x.golden b/agent/xds/testdata/clusters/terminating-gateway-service-subsets.envoy-1-12-x.golden index 27b1ddc6c..8e3db0460 100644 --- a/agent/xds/testdata/clusters/terminating-gateway-service-subsets.envoy-1-12-x.golden +++ b/agent/xds/testdata/clusters/terminating-gateway-service-subsets.envoy-1-12-x.golden @@ -119,6 +119,94 @@ } }, + { + "@type": "type.googleapis.com/envoy.api.v2.Cluster", + "name": "prod.cache.default.dc1.internal.11111111-2222-3333-4444-555555555555.consul", + "type": "LOGICAL_DNS", + "connectTimeout": "5s", + "loadAssignment": { + "clusterName": "prod.cache.default.dc1.internal.11111111-2222-3333-4444-555555555555.consul", + "endpoints": [ + { + "lbEndpoints": [ + { + "endpoint": { + "address": { + "socketAddress": { + "address": "cache.mydomain", + "portValue": 8081 + } + } + }, + "healthStatus": "UNHEALTHY", + "loadBalancingWeight": 1 + } + ] + } + ] + }, + "dnsRefreshRate": "10s", + "dnsLookupFamily": "V4_ONLY", + "outlierDetection": { + + } + }, + { + "@type": "type.googleapis.com/envoy.api.v2.Cluster", + "name": "v1.web.default.dc1.internal.11111111-2222-3333-4444-555555555555.consul", + "type": "EDS", + "edsClusterConfig": { + "edsConfig": { + "ads": { + + } + } + }, + "connectTimeout": "5s", + "tlsContext": { + "commonTlsContext": { + "tlsParams": { + + }, + "validationContext": { + "trustedCa": { + "filename": "ca.cert.pem" + } + } + } + }, + "outlierDetection": { + + } + }, + { + "@type": "type.googleapis.com/envoy.api.v2.Cluster", + "name": "v2.web.default.dc1.internal.11111111-2222-3333-4444-555555555555.consul", + "type": "EDS", + "edsClusterConfig": { + "edsConfig": { + "ads": { + + } + } + }, + "connectTimeout": "5s", + "tlsContext": { + "commonTlsContext": { + "tlsParams": { + + }, + "validationContext": { + "trustedCa": { + "filename": "ca.cert.pem" + } + } + } + }, + "outlierDetection": { + + } + }, { "@type": "type.googleapis.com/envoy.api.v2.Cluster", "name": "web.default.dc1.internal.11111111-2222-3333-4444-555555555555.consul", diff --git a/agent/xds/testdata/clusters/terminating-gateway-service-subsets.envoy-1-13-x.golden b/agent/xds/testdata/clusters/terminating-gateway-service-subsets.envoy-1-13-x.golden index 27b1ddc6c..8e3db0460 100644 --- a/agent/xds/testdata/clusters/terminating-gateway-service-subsets.envoy-1-13-x.golden +++ b/agent/xds/testdata/clusters/terminating-gateway-service-subsets.envoy-1-13-x.golden @@ -119,6 +119,94 @@ } }, + { + "@type": "type.googleapis.com/envoy.api.v2.Cluster", + "name": "prod.cache.default.dc1.internal.11111111-2222-3333-4444-555555555555.consul", + "type": "LOGICAL_DNS", + "connectTimeout": "5s", + "loadAssignment": { + "clusterName": "prod.cache.default.dc1.internal.11111111-2222-3333-4444-555555555555.consul", + "endpoints": [ + { + "lbEndpoints": [ + { + "endpoint": { + "address": { + "socketAddress": { + "address": "cache.mydomain", + "portValue": 8081 + } + } + }, + "healthStatus": "UNHEALTHY", + "loadBalancingWeight": 1 + } + ] + } + ] + }, + "dnsRefreshRate": "10s", + "dnsLookupFamily": "V4_ONLY", + "outlierDetection": { + + } + }, + { + "@type": "type.googleapis.com/envoy.api.v2.Cluster", + "name": "v1.web.default.dc1.internal.11111111-2222-3333-4444-555555555555.consul", + "type": "EDS", + "edsClusterConfig": { + "edsConfig": { + "ads": { + + } + } + }, + "connectTimeout": "5s", + "tlsContext": { + "commonTlsContext": { + "tlsParams": { + + }, + "validationContext": { + "trustedCa": { + "filename": "ca.cert.pem" + } + } + } + }, + "outlierDetection": { + + } + }, + { + "@type": "type.googleapis.com/envoy.api.v2.Cluster", + "name": "v2.web.default.dc1.internal.11111111-2222-3333-4444-555555555555.consul", + "type": "EDS", + "edsClusterConfig": { + "edsConfig": { + "ads": { + + } + } + }, + "connectTimeout": "5s", + "tlsContext": { + "commonTlsContext": { + "tlsParams": { + + }, + "validationContext": { + "trustedCa": { + "filename": "ca.cert.pem" + } + } + } + }, + "outlierDetection": { + + } + }, { "@type": "type.googleapis.com/envoy.api.v2.Cluster", "name": "web.default.dc1.internal.11111111-2222-3333-4444-555555555555.consul", diff --git a/agent/xds/testdata/clusters/terminating-gateway-service-subsets.envoy-1-14-x.golden b/agent/xds/testdata/clusters/terminating-gateway-service-subsets.envoy-1-14-x.golden index 27b1ddc6c..8e3db0460 100644 --- a/agent/xds/testdata/clusters/terminating-gateway-service-subsets.envoy-1-14-x.golden +++ b/agent/xds/testdata/clusters/terminating-gateway-service-subsets.envoy-1-14-x.golden @@ -119,6 +119,94 @@ } }, + { + "@type": "type.googleapis.com/envoy.api.v2.Cluster", + "name": "prod.cache.default.dc1.internal.11111111-2222-3333-4444-555555555555.consul", + "type": "LOGICAL_DNS", + "connectTimeout": "5s", + "loadAssignment": { + "clusterName": "prod.cache.default.dc1.internal.11111111-2222-3333-4444-555555555555.consul", + "endpoints": [ + { + "lbEndpoints": [ + { + "endpoint": { + "address": { + "socketAddress": { + "address": "cache.mydomain", + "portValue": 8081 + } + } + }, + "healthStatus": "UNHEALTHY", + "loadBalancingWeight": 1 + } + ] + } + ] + }, + "dnsRefreshRate": "10s", + "dnsLookupFamily": "V4_ONLY", + "outlierDetection": { + + } + }, + { + "@type": "type.googleapis.com/envoy.api.v2.Cluster", + "name": "v1.web.default.dc1.internal.11111111-2222-3333-4444-555555555555.consul", + "type": "EDS", + "edsClusterConfig": { + "edsConfig": { + "ads": { + + } + } + }, + "connectTimeout": "5s", + "tlsContext": { + "commonTlsContext": { + "tlsParams": { + + }, + "validationContext": { + "trustedCa": { + "filename": "ca.cert.pem" + } + } + } + }, + "outlierDetection": { + + } + }, + { + "@type": "type.googleapis.com/envoy.api.v2.Cluster", + "name": "v2.web.default.dc1.internal.11111111-2222-3333-4444-555555555555.consul", + "type": "EDS", + "edsClusterConfig": { + "edsConfig": { + "ads": { + + } + } + }, + "connectTimeout": "5s", + "tlsContext": { + "commonTlsContext": { + "tlsParams": { + + }, + "validationContext": { + "trustedCa": { + "filename": "ca.cert.pem" + } + } + } + }, + "outlierDetection": { + + } + }, { "@type": "type.googleapis.com/envoy.api.v2.Cluster", "name": "web.default.dc1.internal.11111111-2222-3333-4444-555555555555.consul", diff --git a/agent/xds/testdata/clusters/terminating-gateway-service-subsets.envoy-1-15-x.golden b/agent/xds/testdata/clusters/terminating-gateway-service-subsets.envoy-1-15-x.golden index 27b1ddc6c..8e3db0460 100644 --- a/agent/xds/testdata/clusters/terminating-gateway-service-subsets.envoy-1-15-x.golden +++ b/agent/xds/testdata/clusters/terminating-gateway-service-subsets.envoy-1-15-x.golden @@ -119,6 +119,94 @@ } }, + { + "@type": "type.googleapis.com/envoy.api.v2.Cluster", + "name": "prod.cache.default.dc1.internal.11111111-2222-3333-4444-555555555555.consul", + "type": "LOGICAL_DNS", + "connectTimeout": "5s", + "loadAssignment": { + "clusterName": "prod.cache.default.dc1.internal.11111111-2222-3333-4444-555555555555.consul", + "endpoints": [ + { + "lbEndpoints": [ + { + "endpoint": { + "address": { + "socketAddress": { + "address": "cache.mydomain", + "portValue": 8081 + } + } + }, + "healthStatus": "UNHEALTHY", + "loadBalancingWeight": 1 + } + ] + } + ] + }, + "dnsRefreshRate": "10s", + "dnsLookupFamily": "V4_ONLY", + "outlierDetection": { + + } + }, + { + "@type": "type.googleapis.com/envoy.api.v2.Cluster", + "name": "v1.web.default.dc1.internal.11111111-2222-3333-4444-555555555555.consul", + "type": "EDS", + "edsClusterConfig": { + "edsConfig": { + "ads": { + + } + } + }, + "connectTimeout": "5s", + "tlsContext": { + "commonTlsContext": { + "tlsParams": { + + }, + "validationContext": { + "trustedCa": { + "filename": "ca.cert.pem" + } + } + } + }, + "outlierDetection": { + + } + }, + { + "@type": "type.googleapis.com/envoy.api.v2.Cluster", + "name": "v2.web.default.dc1.internal.11111111-2222-3333-4444-555555555555.consul", + "type": "EDS", + "edsClusterConfig": { + "edsConfig": { + "ads": { + + } + } + }, + "connectTimeout": "5s", + "tlsContext": { + "commonTlsContext": { + "tlsParams": { + + }, + "validationContext": { + "trustedCa": { + "filename": "ca.cert.pem" + } + } + } + }, + "outlierDetection": { + + } + }, { "@type": "type.googleapis.com/envoy.api.v2.Cluster", "name": "web.default.dc1.internal.11111111-2222-3333-4444-555555555555.consul", diff --git a/agent/xds/testdata/listeners/terminating-gateway-custom-and-tagged-addresses.envoy-1-12-x.golden b/agent/xds/testdata/listeners/terminating-gateway-custom-and-tagged-addresses.envoy-1-12-x.golden index 72abeba6b..0164fc635 100644 --- a/agent/xds/testdata/listeners/terminating-gateway-custom-and-tagged-addresses.envoy-1-12-x.golden +++ b/agent/xds/testdata/listeners/terminating-gateway-custom-and-tagged-addresses.envoy-1-12-x.golden @@ -183,33 +183,18 @@ }, "filters": [ { - "name": "envoy.http_connection_manager", + "name": "envoy.filters.network.rbac", "config": { - "http_filters": [ - { - "config": { - "rules": { - } - }, - "name": "envoy.filters.http.rbac" - }, - { - "name": "envoy.router" - } - ], - "rds": { - "config_source": { - "ads": { - } - }, - "route_config_name": "foo" + "rules": { }, - "stat_prefix": "terminating_gateway_default_web_foo_http", - "tracing": { - "operation_name": "EGRESS", - "random_sampling": { - } - } + "stat_prefix": "connect_authz" + } + }, + { + "name": "envoy.tcp_proxy", + "config": { + "cluster": "web.default.dc1.internal.11111111-2222-3333-4444-555555555555.consul", + "stat_prefix": "terminating_gateway_default_web_foo_tcp" } } ] @@ -417,33 +402,18 @@ }, "filters": [ { - "name": "envoy.http_connection_manager", + "name": "envoy.filters.network.rbac", "config": { - "http_filters": [ - { - "config": { - "rules": { - } - }, - "name": "envoy.filters.http.rbac" - }, - { - "name": "envoy.router" - } - ], - "rds": { - "config_source": { - "ads": { - } - }, - "route_config_name": "wan" + "rules": { }, - "stat_prefix": "terminating_gateway_default_web_wan_http", - "tracing": { - "operation_name": "EGRESS", - "random_sampling": { - } - } + "stat_prefix": "connect_authz" + } + }, + { + "name": "envoy.tcp_proxy", + "config": { + "cluster": "web.default.dc1.internal.11111111-2222-3333-4444-555555555555.consul", + "stat_prefix": "terminating_gateway_default_web_wan_tcp" } } ] diff --git a/agent/xds/testdata/listeners/terminating-gateway-custom-and-tagged-addresses.envoy-1-13-x.golden b/agent/xds/testdata/listeners/terminating-gateway-custom-and-tagged-addresses.envoy-1-13-x.golden index 72abeba6b..0164fc635 100644 --- a/agent/xds/testdata/listeners/terminating-gateway-custom-and-tagged-addresses.envoy-1-13-x.golden +++ b/agent/xds/testdata/listeners/terminating-gateway-custom-and-tagged-addresses.envoy-1-13-x.golden @@ -183,33 +183,18 @@ }, "filters": [ { - "name": "envoy.http_connection_manager", + "name": "envoy.filters.network.rbac", "config": { - "http_filters": [ - { - "config": { - "rules": { - } - }, - "name": "envoy.filters.http.rbac" - }, - { - "name": "envoy.router" - } - ], - "rds": { - "config_source": { - "ads": { - } - }, - "route_config_name": "foo" + "rules": { }, - "stat_prefix": "terminating_gateway_default_web_foo_http", - "tracing": { - "operation_name": "EGRESS", - "random_sampling": { - } - } + "stat_prefix": "connect_authz" + } + }, + { + "name": "envoy.tcp_proxy", + "config": { + "cluster": "web.default.dc1.internal.11111111-2222-3333-4444-555555555555.consul", + "stat_prefix": "terminating_gateway_default_web_foo_tcp" } } ] @@ -417,33 +402,18 @@ }, "filters": [ { - "name": "envoy.http_connection_manager", + "name": "envoy.filters.network.rbac", "config": { - "http_filters": [ - { - "config": { - "rules": { - } - }, - "name": "envoy.filters.http.rbac" - }, - { - "name": "envoy.router" - } - ], - "rds": { - "config_source": { - "ads": { - } - }, - "route_config_name": "wan" + "rules": { }, - "stat_prefix": "terminating_gateway_default_web_wan_http", - "tracing": { - "operation_name": "EGRESS", - "random_sampling": { - } - } + "stat_prefix": "connect_authz" + } + }, + { + "name": "envoy.tcp_proxy", + "config": { + "cluster": "web.default.dc1.internal.11111111-2222-3333-4444-555555555555.consul", + "stat_prefix": "terminating_gateway_default_web_wan_tcp" } } ] diff --git a/agent/xds/testdata/listeners/terminating-gateway-custom-and-tagged-addresses.envoy-1-14-x.golden b/agent/xds/testdata/listeners/terminating-gateway-custom-and-tagged-addresses.envoy-1-14-x.golden index 72abeba6b..0164fc635 100644 --- a/agent/xds/testdata/listeners/terminating-gateway-custom-and-tagged-addresses.envoy-1-14-x.golden +++ b/agent/xds/testdata/listeners/terminating-gateway-custom-and-tagged-addresses.envoy-1-14-x.golden @@ -183,33 +183,18 @@ }, "filters": [ { - "name": "envoy.http_connection_manager", + "name": "envoy.filters.network.rbac", "config": { - "http_filters": [ - { - "config": { - "rules": { - } - }, - "name": "envoy.filters.http.rbac" - }, - { - "name": "envoy.router" - } - ], - "rds": { - "config_source": { - "ads": { - } - }, - "route_config_name": "foo" + "rules": { }, - "stat_prefix": "terminating_gateway_default_web_foo_http", - "tracing": { - "operation_name": "EGRESS", - "random_sampling": { - } - } + "stat_prefix": "connect_authz" + } + }, + { + "name": "envoy.tcp_proxy", + "config": { + "cluster": "web.default.dc1.internal.11111111-2222-3333-4444-555555555555.consul", + "stat_prefix": "terminating_gateway_default_web_foo_tcp" } } ] @@ -417,33 +402,18 @@ }, "filters": [ { - "name": "envoy.http_connection_manager", + "name": "envoy.filters.network.rbac", "config": { - "http_filters": [ - { - "config": { - "rules": { - } - }, - "name": "envoy.filters.http.rbac" - }, - { - "name": "envoy.router" - } - ], - "rds": { - "config_source": { - "ads": { - } - }, - "route_config_name": "wan" + "rules": { }, - "stat_prefix": "terminating_gateway_default_web_wan_http", - "tracing": { - "operation_name": "EGRESS", - "random_sampling": { - } - } + "stat_prefix": "connect_authz" + } + }, + { + "name": "envoy.tcp_proxy", + "config": { + "cluster": "web.default.dc1.internal.11111111-2222-3333-4444-555555555555.consul", + "stat_prefix": "terminating_gateway_default_web_wan_tcp" } } ] diff --git a/agent/xds/testdata/listeners/terminating-gateway-custom-and-tagged-addresses.envoy-1-15-x.golden b/agent/xds/testdata/listeners/terminating-gateway-custom-and-tagged-addresses.envoy-1-15-x.golden index 72abeba6b..0164fc635 100644 --- a/agent/xds/testdata/listeners/terminating-gateway-custom-and-tagged-addresses.envoy-1-15-x.golden +++ b/agent/xds/testdata/listeners/terminating-gateway-custom-and-tagged-addresses.envoy-1-15-x.golden @@ -183,33 +183,18 @@ }, "filters": [ { - "name": "envoy.http_connection_manager", + "name": "envoy.filters.network.rbac", "config": { - "http_filters": [ - { - "config": { - "rules": { - } - }, - "name": "envoy.filters.http.rbac" - }, - { - "name": "envoy.router" - } - ], - "rds": { - "config_source": { - "ads": { - } - }, - "route_config_name": "foo" + "rules": { }, - "stat_prefix": "terminating_gateway_default_web_foo_http", - "tracing": { - "operation_name": "EGRESS", - "random_sampling": { - } - } + "stat_prefix": "connect_authz" + } + }, + { + "name": "envoy.tcp_proxy", + "config": { + "cluster": "web.default.dc1.internal.11111111-2222-3333-4444-555555555555.consul", + "stat_prefix": "terminating_gateway_default_web_foo_tcp" } } ] @@ -417,33 +402,18 @@ }, "filters": [ { - "name": "envoy.http_connection_manager", + "name": "envoy.filters.network.rbac", "config": { - "http_filters": [ - { - "config": { - "rules": { - } - }, - "name": "envoy.filters.http.rbac" - }, - { - "name": "envoy.router" - } - ], - "rds": { - "config_source": { - "ads": { - } - }, - "route_config_name": "wan" + "rules": { }, - "stat_prefix": "terminating_gateway_default_web_wan_http", - "tracing": { - "operation_name": "EGRESS", - "random_sampling": { - } - } + "stat_prefix": "connect_authz" + } + }, + { + "name": "envoy.tcp_proxy", + "config": { + "cluster": "web.default.dc1.internal.11111111-2222-3333-4444-555555555555.consul", + "stat_prefix": "terminating_gateway_default_web_wan_tcp" } } ] diff --git a/agent/xds/testdata/listeners/terminating-gateway-no-api-cert.envoy-1-12-x.golden b/agent/xds/testdata/listeners/terminating-gateway-no-api-cert.envoy-1-12-x.golden index cb3860ef5..bfb7ab050 100644 --- a/agent/xds/testdata/listeners/terminating-gateway-no-api-cert.envoy-1-12-x.golden +++ b/agent/xds/testdata/listeners/terminating-gateway-no-api-cert.envoy-1-12-x.golden @@ -136,33 +136,18 @@ }, "filters": [ { - "name": "envoy.http_connection_manager", + "name": "envoy.filters.network.rbac", "config": { - "http_filters": [ - { - "config": { - "rules": { - } - }, - "name": "envoy.filters.http.rbac" - }, - { - "name": "envoy.router" - } - ], - "rds": { - "config_source": { - "ads": { - } - }, - "route_config_name": "default" + "rules": { }, - "stat_prefix": "terminating_gateway_default_web_default_http", - "tracing": { - "operation_name": "EGRESS", - "random_sampling": { - } - } + "stat_prefix": "connect_authz" + } + }, + { + "name": "envoy.tcp_proxy", + "config": { + "cluster": "web.default.dc1.internal.11111111-2222-3333-4444-555555555555.consul", + "stat_prefix": "terminating_gateway_default_web_default_tcp" } } ] diff --git a/agent/xds/testdata/listeners/terminating-gateway-no-api-cert.envoy-1-13-x.golden b/agent/xds/testdata/listeners/terminating-gateway-no-api-cert.envoy-1-13-x.golden index cb3860ef5..bfb7ab050 100644 --- a/agent/xds/testdata/listeners/terminating-gateway-no-api-cert.envoy-1-13-x.golden +++ b/agent/xds/testdata/listeners/terminating-gateway-no-api-cert.envoy-1-13-x.golden @@ -136,33 +136,18 @@ }, "filters": [ { - "name": "envoy.http_connection_manager", + "name": "envoy.filters.network.rbac", "config": { - "http_filters": [ - { - "config": { - "rules": { - } - }, - "name": "envoy.filters.http.rbac" - }, - { - "name": "envoy.router" - } - ], - "rds": { - "config_source": { - "ads": { - } - }, - "route_config_name": "default" + "rules": { }, - "stat_prefix": "terminating_gateway_default_web_default_http", - "tracing": { - "operation_name": "EGRESS", - "random_sampling": { - } - } + "stat_prefix": "connect_authz" + } + }, + { + "name": "envoy.tcp_proxy", + "config": { + "cluster": "web.default.dc1.internal.11111111-2222-3333-4444-555555555555.consul", + "stat_prefix": "terminating_gateway_default_web_default_tcp" } } ] diff --git a/agent/xds/testdata/listeners/terminating-gateway-no-api-cert.envoy-1-14-x.golden b/agent/xds/testdata/listeners/terminating-gateway-no-api-cert.envoy-1-14-x.golden index cb3860ef5..bfb7ab050 100644 --- a/agent/xds/testdata/listeners/terminating-gateway-no-api-cert.envoy-1-14-x.golden +++ b/agent/xds/testdata/listeners/terminating-gateway-no-api-cert.envoy-1-14-x.golden @@ -136,33 +136,18 @@ }, "filters": [ { - "name": "envoy.http_connection_manager", + "name": "envoy.filters.network.rbac", "config": { - "http_filters": [ - { - "config": { - "rules": { - } - }, - "name": "envoy.filters.http.rbac" - }, - { - "name": "envoy.router" - } - ], - "rds": { - "config_source": { - "ads": { - } - }, - "route_config_name": "default" + "rules": { }, - "stat_prefix": "terminating_gateway_default_web_default_http", - "tracing": { - "operation_name": "EGRESS", - "random_sampling": { - } - } + "stat_prefix": "connect_authz" + } + }, + { + "name": "envoy.tcp_proxy", + "config": { + "cluster": "web.default.dc1.internal.11111111-2222-3333-4444-555555555555.consul", + "stat_prefix": "terminating_gateway_default_web_default_tcp" } } ] diff --git a/agent/xds/testdata/listeners/terminating-gateway-no-api-cert.envoy-1-15-x.golden b/agent/xds/testdata/listeners/terminating-gateway-no-api-cert.envoy-1-15-x.golden index cb3860ef5..bfb7ab050 100644 --- a/agent/xds/testdata/listeners/terminating-gateway-no-api-cert.envoy-1-15-x.golden +++ b/agent/xds/testdata/listeners/terminating-gateway-no-api-cert.envoy-1-15-x.golden @@ -136,33 +136,18 @@ }, "filters": [ { - "name": "envoy.http_connection_manager", + "name": "envoy.filters.network.rbac", "config": { - "http_filters": [ - { - "config": { - "rules": { - } - }, - "name": "envoy.filters.http.rbac" - }, - { - "name": "envoy.router" - } - ], - "rds": { - "config_source": { - "ads": { - } - }, - "route_config_name": "default" + "rules": { }, - "stat_prefix": "terminating_gateway_default_web_default_http", - "tracing": { - "operation_name": "EGRESS", - "random_sampling": { - } - } + "stat_prefix": "connect_authz" + } + }, + { + "name": "envoy.tcp_proxy", + "config": { + "cluster": "web.default.dc1.internal.11111111-2222-3333-4444-555555555555.consul", + "stat_prefix": "terminating_gateway_default_web_default_tcp" } } ] diff --git a/agent/xds/testdata/listeners/terminating-gateway.envoy-1-12-x.golden b/agent/xds/testdata/listeners/terminating-gateway.envoy-1-12-x.golden index 3ef59ad7d..eba577e6c 100644 --- a/agent/xds/testdata/listeners/terminating-gateway.envoy-1-12-x.golden +++ b/agent/xds/testdata/listeners/terminating-gateway.envoy-1-12-x.golden @@ -183,33 +183,18 @@ }, "filters": [ { - "name": "envoy.http_connection_manager", + "name": "envoy.filters.network.rbac", "config": { - "http_filters": [ - { - "config": { - "rules": { - } - }, - "name": "envoy.filters.http.rbac" - }, - { - "name": "envoy.router" - } - ], - "rds": { - "config_source": { - "ads": { - } - }, - "route_config_name": "default" + "rules": { }, - "stat_prefix": "terminating_gateway_default_web_default_http", - "tracing": { - "operation_name": "EGRESS", - "random_sampling": { - } - } + "stat_prefix": "connect_authz" + } + }, + { + "name": "envoy.tcp_proxy", + "config": { + "cluster": "web.default.dc1.internal.11111111-2222-3333-4444-555555555555.consul", + "stat_prefix": "terminating_gateway_default_web_default_tcp" } } ] diff --git a/agent/xds/testdata/listeners/terminating-gateway.envoy-1-13-x.golden b/agent/xds/testdata/listeners/terminating-gateway.envoy-1-13-x.golden index 3ef59ad7d..eba577e6c 100644 --- a/agent/xds/testdata/listeners/terminating-gateway.envoy-1-13-x.golden +++ b/agent/xds/testdata/listeners/terminating-gateway.envoy-1-13-x.golden @@ -183,33 +183,18 @@ }, "filters": [ { - "name": "envoy.http_connection_manager", + "name": "envoy.filters.network.rbac", "config": { - "http_filters": [ - { - "config": { - "rules": { - } - }, - "name": "envoy.filters.http.rbac" - }, - { - "name": "envoy.router" - } - ], - "rds": { - "config_source": { - "ads": { - } - }, - "route_config_name": "default" + "rules": { }, - "stat_prefix": "terminating_gateway_default_web_default_http", - "tracing": { - "operation_name": "EGRESS", - "random_sampling": { - } - } + "stat_prefix": "connect_authz" + } + }, + { + "name": "envoy.tcp_proxy", + "config": { + "cluster": "web.default.dc1.internal.11111111-2222-3333-4444-555555555555.consul", + "stat_prefix": "terminating_gateway_default_web_default_tcp" } } ] diff --git a/agent/xds/testdata/listeners/terminating-gateway.envoy-1-14-x.golden b/agent/xds/testdata/listeners/terminating-gateway.envoy-1-14-x.golden index 3ef59ad7d..eba577e6c 100644 --- a/agent/xds/testdata/listeners/terminating-gateway.envoy-1-14-x.golden +++ b/agent/xds/testdata/listeners/terminating-gateway.envoy-1-14-x.golden @@ -183,33 +183,18 @@ }, "filters": [ { - "name": "envoy.http_connection_manager", + "name": "envoy.filters.network.rbac", "config": { - "http_filters": [ - { - "config": { - "rules": { - } - }, - "name": "envoy.filters.http.rbac" - }, - { - "name": "envoy.router" - } - ], - "rds": { - "config_source": { - "ads": { - } - }, - "route_config_name": "default" + "rules": { }, - "stat_prefix": "terminating_gateway_default_web_default_http", - "tracing": { - "operation_name": "EGRESS", - "random_sampling": { - } - } + "stat_prefix": "connect_authz" + } + }, + { + "name": "envoy.tcp_proxy", + "config": { + "cluster": "web.default.dc1.internal.11111111-2222-3333-4444-555555555555.consul", + "stat_prefix": "terminating_gateway_default_web_default_tcp" } } ] diff --git a/agent/xds/testdata/listeners/terminating-gateway.envoy-1-15-x.golden b/agent/xds/testdata/listeners/terminating-gateway.envoy-1-15-x.golden index 3ef59ad7d..eba577e6c 100644 --- a/agent/xds/testdata/listeners/terminating-gateway.envoy-1-15-x.golden +++ b/agent/xds/testdata/listeners/terminating-gateway.envoy-1-15-x.golden @@ -183,33 +183,18 @@ }, "filters": [ { - "name": "envoy.http_connection_manager", + "name": "envoy.filters.network.rbac", "config": { - "http_filters": [ - { - "config": { - "rules": { - } - }, - "name": "envoy.filters.http.rbac" - }, - { - "name": "envoy.router" - } - ], - "rds": { - "config_source": { - "ads": { - } - }, - "route_config_name": "default" + "rules": { }, - "stat_prefix": "terminating_gateway_default_web_default_http", - "tracing": { - "operation_name": "EGRESS", - "random_sampling": { - } - } + "stat_prefix": "connect_authz" + } + }, + { + "name": "envoy.tcp_proxy", + "config": { + "cluster": "web.default.dc1.internal.11111111-2222-3333-4444-555555555555.consul", + "stat_prefix": "terminating_gateway_default_web_default_tcp" } } ]