xds: Use only the port number as the configured route name

This removes duplication of protocol from the stats_prefix
This commit is contained in:
Chris Piraino 2020-04-30 09:31:37 -05:00
parent 04b6bd637a
commit 9b9dfa8eeb
8 changed files with 13 additions and 13 deletions

View File

@ -222,7 +222,7 @@ type IngressListenerKey struct {
}
func (k *IngressListenerKey) RouteName() string {
return fmt.Sprintf("%s_%d", k.Protocol, k.Port)
return fmt.Sprintf("%d", k.Port)
}
// ConfigSnapshot captures all the resulting config needed for a proxy instance.

View File

@ -26,9 +26,9 @@
"ads": {
}
},
"route_config_name": "http_443"
"route_config_name": "443"
},
"stat_prefix": "ingress_upstream_http_443_http",
"stat_prefix": "ingress_upstream_443_http",
"tracing": {
"operation_name": "EGRESS",
"random_sampling": {
@ -65,9 +65,9 @@
"ads": {
}
},
"route_config_name": "http_8080"
"route_config_name": "8080"
},
"stat_prefix": "ingress_upstream_http_8080_http",
"stat_prefix": "ingress_upstream_8080_http",
"tracing": {
"operation_name": "EGRESS",
"random_sampling": {

View File

@ -26,9 +26,9 @@
"ads": {
}
},
"route_config_name": "http_9191"
"route_config_name": "9191"
},
"stat_prefix": "ingress_upstream_http_9191_http",
"stat_prefix": "ingress_upstream_9191_http",
"tracing": {
"operation_name": "EGRESS",
"random_sampling": {

View File

@ -3,7 +3,7 @@
"resources": [
{
"@type": "type.googleapis.com/envoy.api.v2.RouteConfiguration",
"name": "http_443",
"name": "443",
"virtualHosts": [
{
"name": "baz",
@ -42,7 +42,7 @@
},
{
"@type": "type.googleapis.com/envoy.api.v2.RouteConfiguration",
"name": "http_8080",
"name": "8080",
"virtualHosts": [
{
"name": "foo",

View File

@ -3,7 +3,7 @@
"resources": [
{
"@type": "type.googleapis.com/envoy.api.v2.RouteConfiguration",
"name": "http_9191",
"name": "9191",
"virtualHosts": [
{
"name": "db",

View File

@ -3,7 +3,7 @@
"resources": [
{
"@type": "type.googleapis.com/envoy.api.v2.RouteConfiguration",
"name": "http_9191",
"name": "9191",
"virtualHosts": [
{
"name": "db",

View File

@ -3,7 +3,7 @@
"resources": [
{
"@type": "type.googleapis.com/envoy.api.v2.RouteConfiguration",
"name": "http_9191",
"name": "9191",
"virtualHosts": [
{
"name": "db",

View File

@ -3,7 +3,7 @@
"resources": [
{
"@type": "type.googleapis.com/envoy.api.v2.RouteConfiguration",
"name": "http_9191",
"name": "9191",
"virtualHosts": [
{
"name": "db",