diff --git a/agent/xds/listeners.go b/agent/xds/listeners.go index 1cd54b3426..e2050bf441 100644 --- a/agent/xds/listeners.go +++ b/agent/xds/listeners.go @@ -1133,13 +1133,12 @@ func (s *ResourceGenerator) makeFilterChainTerminatingGateway( // Lastly we setup the actual proxying component. For L4 this is a straight // tcp proxy. For L7 this is a very hands-off HTTP proxy just to inject an // HTTP filter to do intention checks here instead. - statPrefix := fmt.Sprintf("terminating_gateway.%s.%s.", service.NamespaceOrDefault(), service.Name) opts := listenerFilterOpts{ protocol: protocol, - filterName: listener, + filterName: fmt.Sprintf("%s.%s.%s.", service.Name, service.NamespaceOrDefault(), cfgSnap.Datacenter), routeName: cluster, // Set cluster name for route config since each will have its own cluster: cluster, - statPrefix: statPrefix, + statPrefix: "upstream.", routePath: "", } diff --git a/agent/xds/testdata/listeners/terminating-gateway-custom-and-tagged-addresses.envoy-1-18-x.golden b/agent/xds/testdata/listeners/terminating-gateway-custom-and-tagged-addresses.envoy-1-18-x.golden index 5ac6746c15..dff56531b2 100644 --- a/agent/xds/testdata/listeners/terminating-gateway-custom-and-tagged-addresses.envoy-1-18-x.golden +++ b/agent/xds/testdata/listeners/terminating-gateway-custom-and-tagged-addresses.envoy-1-18-x.golden @@ -32,7 +32,7 @@ "name": "envoy.filters.network.tcp_proxy", "typedConfig": { "@type": "type.googleapis.com/envoy.extensions.filters.network.tcp_proxy.v3.TcpProxy", - "statPrefix": "terminating_gateway.default.api.foo", + "statPrefix": "upstream.api.default.dc1.", "cluster": "api.default.dc1.internal.11111111-2222-3333-4444-555555555555.consul" } } @@ -86,7 +86,7 @@ "name": "envoy.filters.network.tcp_proxy", "typedConfig": { "@type": "type.googleapis.com/envoy.extensions.filters.network.tcp_proxy.v3.TcpProxy", - "statPrefix": "terminating_gateway.default.cache.foo", + "statPrefix": "upstream.cache.default.dc1.", "cluster": "cache.default.dc1.internal.11111111-2222-3333-4444-555555555555.consul" } } @@ -140,7 +140,7 @@ "name": "envoy.filters.network.tcp_proxy", "typedConfig": { "@type": "type.googleapis.com/envoy.extensions.filters.network.tcp_proxy.v3.TcpProxy", - "statPrefix": "terminating_gateway.default.db.foo", + "statPrefix": "upstream.db.default.dc1.", "cluster": "db.default.dc1.internal.11111111-2222-3333-4444-555555555555.consul" } } @@ -194,7 +194,7 @@ "name": "envoy.filters.network.tcp_proxy", "typedConfig": { "@type": "type.googleapis.com/envoy.extensions.filters.network.tcp_proxy.v3.TcpProxy", - "statPrefix": "terminating_gateway.default.web.foo", + "statPrefix": "upstream.web.default.dc1.", "cluster": "web.default.dc1.internal.11111111-2222-3333-4444-555555555555.consul" } } @@ -281,7 +281,7 @@ "name": "envoy.filters.network.tcp_proxy", "typedConfig": { "@type": "type.googleapis.com/envoy.extensions.filters.network.tcp_proxy.v3.TcpProxy", - "statPrefix": "terminating_gateway.default.api.wan", + "statPrefix": "upstream.api.default.dc1.", "cluster": "api.default.dc1.internal.11111111-2222-3333-4444-555555555555.consul" } } @@ -335,7 +335,7 @@ "name": "envoy.filters.network.tcp_proxy", "typedConfig": { "@type": "type.googleapis.com/envoy.extensions.filters.network.tcp_proxy.v3.TcpProxy", - "statPrefix": "terminating_gateway.default.cache.wan", + "statPrefix": "upstream.cache.default.dc1.", "cluster": "cache.default.dc1.internal.11111111-2222-3333-4444-555555555555.consul" } } @@ -389,7 +389,7 @@ "name": "envoy.filters.network.tcp_proxy", "typedConfig": { "@type": "type.googleapis.com/envoy.extensions.filters.network.tcp_proxy.v3.TcpProxy", - "statPrefix": "terminating_gateway.default.db.wan", + "statPrefix": "upstream.db.default.dc1.", "cluster": "db.default.dc1.internal.11111111-2222-3333-4444-555555555555.consul" } } @@ -443,7 +443,7 @@ "name": "envoy.filters.network.tcp_proxy", "typedConfig": { "@type": "type.googleapis.com/envoy.extensions.filters.network.tcp_proxy.v3.TcpProxy", - "statPrefix": "terminating_gateway.default.web.wan", + "statPrefix": "upstream.web.default.dc1.", "cluster": "web.default.dc1.internal.11111111-2222-3333-4444-555555555555.consul" } } diff --git a/agent/xds/testdata/listeners/terminating-gateway-custom-and-tagged-addresses.v2compat.envoy-1-16-x.golden b/agent/xds/testdata/listeners/terminating-gateway-custom-and-tagged-addresses.v2compat.envoy-1-16-x.golden index 11e4fb3763..f6d1a1ab2d 100644 --- a/agent/xds/testdata/listeners/terminating-gateway-custom-and-tagged-addresses.v2compat.envoy-1-16-x.golden +++ b/agent/xds/testdata/listeners/terminating-gateway-custom-and-tagged-addresses.v2compat.envoy-1-16-x.golden @@ -32,7 +32,7 @@ "name": "envoy.filters.network.tcp_proxy", "typedConfig": { "@type": "type.googleapis.com/envoy.config.filter.network.tcp_proxy.v2.TcpProxy", - "statPrefix": "terminating_gateway.default.api.foo", + "statPrefix": "upstream.api.default.dc1.", "cluster": "api.default.dc1.internal.11111111-2222-3333-4444-555555555555.consul" } } @@ -86,7 +86,7 @@ "name": "envoy.filters.network.tcp_proxy", "typedConfig": { "@type": "type.googleapis.com/envoy.config.filter.network.tcp_proxy.v2.TcpProxy", - "statPrefix": "terminating_gateway.default.cache.foo", + "statPrefix": "upstream.cache.default.dc1.", "cluster": "cache.default.dc1.internal.11111111-2222-3333-4444-555555555555.consul" } } @@ -140,7 +140,7 @@ "name": "envoy.filters.network.tcp_proxy", "typedConfig": { "@type": "type.googleapis.com/envoy.config.filter.network.tcp_proxy.v2.TcpProxy", - "statPrefix": "terminating_gateway.default.db.foo", + "statPrefix": "upstream.db.default.dc1.", "cluster": "db.default.dc1.internal.11111111-2222-3333-4444-555555555555.consul" } } @@ -194,7 +194,7 @@ "name": "envoy.filters.network.tcp_proxy", "typedConfig": { "@type": "type.googleapis.com/envoy.config.filter.network.tcp_proxy.v2.TcpProxy", - "statPrefix": "terminating_gateway.default.web.foo", + "statPrefix": "upstream.web.default.dc1.", "cluster": "web.default.dc1.internal.11111111-2222-3333-4444-555555555555.consul" } } @@ -281,7 +281,7 @@ "name": "envoy.filters.network.tcp_proxy", "typedConfig": { "@type": "type.googleapis.com/envoy.config.filter.network.tcp_proxy.v2.TcpProxy", - "statPrefix": "terminating_gateway.default.api.wan", + "statPrefix": "upstream.api.default.dc1.", "cluster": "api.default.dc1.internal.11111111-2222-3333-4444-555555555555.consul" } } @@ -335,7 +335,7 @@ "name": "envoy.filters.network.tcp_proxy", "typedConfig": { "@type": "type.googleapis.com/envoy.config.filter.network.tcp_proxy.v2.TcpProxy", - "statPrefix": "terminating_gateway.default.cache.wan", + "statPrefix": "upstream.cache.default.dc1.", "cluster": "cache.default.dc1.internal.11111111-2222-3333-4444-555555555555.consul" } } @@ -389,7 +389,7 @@ "name": "envoy.filters.network.tcp_proxy", "typedConfig": { "@type": "type.googleapis.com/envoy.config.filter.network.tcp_proxy.v2.TcpProxy", - "statPrefix": "terminating_gateway.default.db.wan", + "statPrefix": "upstream.db.default.dc1.", "cluster": "db.default.dc1.internal.11111111-2222-3333-4444-555555555555.consul" } } @@ -443,7 +443,7 @@ "name": "envoy.filters.network.tcp_proxy", "typedConfig": { "@type": "type.googleapis.com/envoy.config.filter.network.tcp_proxy.v2.TcpProxy", - "statPrefix": "terminating_gateway.default.web.wan", + "statPrefix": "upstream.web.default.dc1.", "cluster": "web.default.dc1.internal.11111111-2222-3333-4444-555555555555.consul" } } diff --git a/agent/xds/testdata/listeners/terminating-gateway-no-api-cert.envoy-1-18-x.golden b/agent/xds/testdata/listeners/terminating-gateway-no-api-cert.envoy-1-18-x.golden index 69b0b6d435..8562563401 100644 --- a/agent/xds/testdata/listeners/terminating-gateway-no-api-cert.envoy-1-18-x.golden +++ b/agent/xds/testdata/listeners/terminating-gateway-no-api-cert.envoy-1-18-x.golden @@ -32,7 +32,7 @@ "name": "envoy.filters.network.tcp_proxy", "typedConfig": { "@type": "type.googleapis.com/envoy.extensions.filters.network.tcp_proxy.v3.TcpProxy", - "statPrefix": "terminating_gateway.default.cache.default", + "statPrefix": "upstream.cache.default.dc1.", "cluster": "cache.default.dc1.internal.11111111-2222-3333-4444-555555555555.consul" } } @@ -86,7 +86,7 @@ "name": "envoy.filters.network.tcp_proxy", "typedConfig": { "@type": "type.googleapis.com/envoy.extensions.filters.network.tcp_proxy.v3.TcpProxy", - "statPrefix": "terminating_gateway.default.db.default", + "statPrefix": "upstream.db.default.dc1.", "cluster": "db.default.dc1.internal.11111111-2222-3333-4444-555555555555.consul" } } @@ -140,7 +140,7 @@ "name": "envoy.filters.network.tcp_proxy", "typedConfig": { "@type": "type.googleapis.com/envoy.extensions.filters.network.tcp_proxy.v3.TcpProxy", - "statPrefix": "terminating_gateway.default.web.default", + "statPrefix": "upstream.web.default.dc1.", "cluster": "web.default.dc1.internal.11111111-2222-3333-4444-555555555555.consul" } } diff --git a/agent/xds/testdata/listeners/terminating-gateway-no-api-cert.v2compat.envoy-1-16-x.golden b/agent/xds/testdata/listeners/terminating-gateway-no-api-cert.v2compat.envoy-1-16-x.golden index 3d86ab50b3..522dbf7010 100644 --- a/agent/xds/testdata/listeners/terminating-gateway-no-api-cert.v2compat.envoy-1-16-x.golden +++ b/agent/xds/testdata/listeners/terminating-gateway-no-api-cert.v2compat.envoy-1-16-x.golden @@ -32,7 +32,7 @@ "name": "envoy.filters.network.tcp_proxy", "typedConfig": { "@type": "type.googleapis.com/envoy.config.filter.network.tcp_proxy.v2.TcpProxy", - "statPrefix": "terminating_gateway.default.cache.default", + "statPrefix": "upstream.cache.default.dc1.", "cluster": "cache.default.dc1.internal.11111111-2222-3333-4444-555555555555.consul" } } @@ -86,7 +86,7 @@ "name": "envoy.filters.network.tcp_proxy", "typedConfig": { "@type": "type.googleapis.com/envoy.config.filter.network.tcp_proxy.v2.TcpProxy", - "statPrefix": "terminating_gateway.default.db.default", + "statPrefix": "upstream.db.default.dc1.", "cluster": "db.default.dc1.internal.11111111-2222-3333-4444-555555555555.consul" } } @@ -140,7 +140,7 @@ "name": "envoy.filters.network.tcp_proxy", "typedConfig": { "@type": "type.googleapis.com/envoy.config.filter.network.tcp_proxy.v2.TcpProxy", - "statPrefix": "terminating_gateway.default.web.default", + "statPrefix": "upstream.web.default.dc1.", "cluster": "web.default.dc1.internal.11111111-2222-3333-4444-555555555555.consul" } } diff --git a/agent/xds/testdata/listeners/terminating-gateway-service-subsets.envoy-1-18-x.golden b/agent/xds/testdata/listeners/terminating-gateway-service-subsets.envoy-1-18-x.golden index 882d1f5405..0116baa90a 100644 --- a/agent/xds/testdata/listeners/terminating-gateway-service-subsets.envoy-1-18-x.golden +++ b/agent/xds/testdata/listeners/terminating-gateway-service-subsets.envoy-1-18-x.golden @@ -32,7 +32,7 @@ "name": "envoy.filters.network.tcp_proxy", "typedConfig": { "@type": "type.googleapis.com/envoy.extensions.filters.network.tcp_proxy.v3.TcpProxy", - "statPrefix": "terminating_gateway.default.api.default", + "statPrefix": "upstream.api.default.dc1.", "cluster": "api.default.dc1.internal.11111111-2222-3333-4444-555555555555.consul" } } @@ -86,7 +86,7 @@ "name": "envoy.filters.network.tcp_proxy", "typedConfig": { "@type": "type.googleapis.com/envoy.extensions.filters.network.tcp_proxy.v3.TcpProxy", - "statPrefix": "terminating_gateway.default.cache.default", + "statPrefix": "upstream.cache.default.dc1.", "cluster": "cache.default.dc1.internal.11111111-2222-3333-4444-555555555555.consul" } } @@ -140,7 +140,7 @@ "name": "envoy.filters.network.tcp_proxy", "typedConfig": { "@type": "type.googleapis.com/envoy.extensions.filters.network.tcp_proxy.v3.TcpProxy", - "statPrefix": "terminating_gateway.default.db.default", + "statPrefix": "upstream.db.default.dc1.", "cluster": "db.default.dc1.internal.11111111-2222-3333-4444-555555555555.consul" } } @@ -184,7 +184,7 @@ "name": "envoy.filters.network.http_connection_manager", "typedConfig": { "@type": "type.googleapis.com/envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager", - "statPrefix": "terminating_gateway.default.web.default", + "statPrefix": "upstream.web.default.dc1.", "rds": { "configSource": { "ads": { @@ -255,7 +255,7 @@ "name": "envoy.filters.network.http_connection_manager", "typedConfig": { "@type": "type.googleapis.com/envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager", - "statPrefix": "terminating_gateway.default.web.default", + "statPrefix": "upstream.web.default.dc1.", "rds": { "configSource": { "ads": { @@ -326,7 +326,7 @@ "name": "envoy.filters.network.http_connection_manager", "typedConfig": { "@type": "type.googleapis.com/envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager", - "statPrefix": "terminating_gateway.default.web.default", + "statPrefix": "upstream.web.default.dc1.", "rds": { "configSource": { "ads": { diff --git a/agent/xds/testdata/listeners/terminating-gateway-service-subsets.v2compat.envoy-1-16-x.golden b/agent/xds/testdata/listeners/terminating-gateway-service-subsets.v2compat.envoy-1-16-x.golden index 803233d6d5..9f537846c4 100644 --- a/agent/xds/testdata/listeners/terminating-gateway-service-subsets.v2compat.envoy-1-16-x.golden +++ b/agent/xds/testdata/listeners/terminating-gateway-service-subsets.v2compat.envoy-1-16-x.golden @@ -32,7 +32,7 @@ "name": "envoy.filters.network.tcp_proxy", "typedConfig": { "@type": "type.googleapis.com/envoy.config.filter.network.tcp_proxy.v2.TcpProxy", - "statPrefix": "terminating_gateway.default.api.default", + "statPrefix": "upstream.api.default.dc1.", "cluster": "api.default.dc1.internal.11111111-2222-3333-4444-555555555555.consul" } } @@ -86,7 +86,7 @@ "name": "envoy.filters.network.tcp_proxy", "typedConfig": { "@type": "type.googleapis.com/envoy.config.filter.network.tcp_proxy.v2.TcpProxy", - "statPrefix": "terminating_gateway.default.cache.default", + "statPrefix": "upstream.cache.default.dc1.", "cluster": "cache.default.dc1.internal.11111111-2222-3333-4444-555555555555.consul" } } @@ -140,7 +140,7 @@ "name": "envoy.filters.network.tcp_proxy", "typedConfig": { "@type": "type.googleapis.com/envoy.config.filter.network.tcp_proxy.v2.TcpProxy", - "statPrefix": "terminating_gateway.default.db.default", + "statPrefix": "upstream.db.default.dc1.", "cluster": "db.default.dc1.internal.11111111-2222-3333-4444-555555555555.consul" } } @@ -184,7 +184,7 @@ "name": "envoy.filters.network.http_connection_manager", "typedConfig": { "@type": "type.googleapis.com/envoy.config.filter.network.http_connection_manager.v2.HttpConnectionManager", - "statPrefix": "terminating_gateway.default.web.default", + "statPrefix": "upstream.web.default.dc1.", "rds": { "configSource": { "ads": { @@ -255,7 +255,7 @@ "name": "envoy.filters.network.http_connection_manager", "typedConfig": { "@type": "type.googleapis.com/envoy.config.filter.network.http_connection_manager.v2.HttpConnectionManager", - "statPrefix": "terminating_gateway.default.web.default", + "statPrefix": "upstream.web.default.dc1.", "rds": { "configSource": { "ads": { @@ -326,7 +326,7 @@ "name": "envoy.filters.network.http_connection_manager", "typedConfig": { "@type": "type.googleapis.com/envoy.config.filter.network.http_connection_manager.v2.HttpConnectionManager", - "statPrefix": "terminating_gateway.default.web.default", + "statPrefix": "upstream.web.default.dc1.", "rds": { "configSource": { "ads": { diff --git a/agent/xds/testdata/listeners/terminating-gateway.envoy-1-18-x.golden b/agent/xds/testdata/listeners/terminating-gateway.envoy-1-18-x.golden index 098b015ede..6acb1c46db 100644 --- a/agent/xds/testdata/listeners/terminating-gateway.envoy-1-18-x.golden +++ b/agent/xds/testdata/listeners/terminating-gateway.envoy-1-18-x.golden @@ -32,7 +32,7 @@ "name": "envoy.filters.network.tcp_proxy", "typedConfig": { "@type": "type.googleapis.com/envoy.extensions.filters.network.tcp_proxy.v3.TcpProxy", - "statPrefix": "terminating_gateway.default.api.default", + "statPrefix": "upstream.api.default.dc1.", "cluster": "api.default.dc1.internal.11111111-2222-3333-4444-555555555555.consul" } } @@ -86,7 +86,7 @@ "name": "envoy.filters.network.tcp_proxy", "typedConfig": { "@type": "type.googleapis.com/envoy.extensions.filters.network.tcp_proxy.v3.TcpProxy", - "statPrefix": "terminating_gateway.default.cache.default", + "statPrefix": "upstream.cache.default.dc1.", "cluster": "cache.default.dc1.internal.11111111-2222-3333-4444-555555555555.consul" } } @@ -140,7 +140,7 @@ "name": "envoy.filters.network.tcp_proxy", "typedConfig": { "@type": "type.googleapis.com/envoy.extensions.filters.network.tcp_proxy.v3.TcpProxy", - "statPrefix": "terminating_gateway.default.db.default", + "statPrefix": "upstream.db.default.dc1.", "cluster": "db.default.dc1.internal.11111111-2222-3333-4444-555555555555.consul" } } @@ -194,7 +194,7 @@ "name": "envoy.filters.network.tcp_proxy", "typedConfig": { "@type": "type.googleapis.com/envoy.extensions.filters.network.tcp_proxy.v3.TcpProxy", - "statPrefix": "terminating_gateway.default.web.default", + "statPrefix": "upstream.web.default.dc1.", "cluster": "web.default.dc1.internal.11111111-2222-3333-4444-555555555555.consul" } } diff --git a/agent/xds/testdata/listeners/terminating-gateway.v2compat.envoy-1-16-x.golden b/agent/xds/testdata/listeners/terminating-gateway.v2compat.envoy-1-16-x.golden index aca6d44eaa..39e30e8c98 100644 --- a/agent/xds/testdata/listeners/terminating-gateway.v2compat.envoy-1-16-x.golden +++ b/agent/xds/testdata/listeners/terminating-gateway.v2compat.envoy-1-16-x.golden @@ -32,7 +32,7 @@ "name": "envoy.filters.network.tcp_proxy", "typedConfig": { "@type": "type.googleapis.com/envoy.config.filter.network.tcp_proxy.v2.TcpProxy", - "statPrefix": "terminating_gateway.default.api.default", + "statPrefix": "upstream.api.default.dc1.", "cluster": "api.default.dc1.internal.11111111-2222-3333-4444-555555555555.consul" } } @@ -86,7 +86,7 @@ "name": "envoy.filters.network.tcp_proxy", "typedConfig": { "@type": "type.googleapis.com/envoy.config.filter.network.tcp_proxy.v2.TcpProxy", - "statPrefix": "terminating_gateway.default.cache.default", + "statPrefix": "upstream.cache.default.dc1.", "cluster": "cache.default.dc1.internal.11111111-2222-3333-4444-555555555555.consul" } } @@ -140,7 +140,7 @@ "name": "envoy.filters.network.tcp_proxy", "typedConfig": { "@type": "type.googleapis.com/envoy.config.filter.network.tcp_proxy.v2.TcpProxy", - "statPrefix": "terminating_gateway.default.db.default", + "statPrefix": "upstream.db.default.dc1.", "cluster": "db.default.dc1.internal.11111111-2222-3333-4444-555555555555.consul" } } @@ -194,7 +194,7 @@ "name": "envoy.filters.network.tcp_proxy", "typedConfig": { "@type": "type.googleapis.com/envoy.config.filter.network.tcp_proxy.v2.TcpProxy", - "statPrefix": "terminating_gateway.default.web.default", + "statPrefix": "upstream.web.default.dc1.", "cluster": "web.default.dc1.internal.11111111-2222-3333-4444-555555555555.consul" } }