From cf25214dcf00630b68ed9a97bea7e32d15a0b215 Mon Sep 17 00:00:00 2001 From: Nick Ethier Date: Tue, 30 May 2023 11:43:11 -0400 Subject: [PATCH] use correct envoy config key for telemetry --- .../controllers/endpoints/endpoints_controller.go | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/control-plane/connect-inject/controllers/endpoints/endpoints_controller.go b/control-plane/connect-inject/controllers/endpoints/endpoints_controller.go index c04349fbdd..73bde35ba5 100644 --- a/control-plane/connect-inject/controllers/endpoints/endpoints_controller.go +++ b/control-plane/connect-inject/controllers/endpoints/endpoints_controller.go @@ -45,9 +45,10 @@ const ( terminatingGateway = "terminating-gateway" ingressGateway = "ingress-gateway" - kubernetesSuccessReasonMsg = "Kubernetes health checks passing" - envoyPrometheusBindAddr = "envoy_prometheus_bind_addr" - defaultNS = "default" + kubernetesSuccessReasonMsg = "Kubernetes health checks passing" + envoyPrometheusBindAddr = "envoy_prometheus_bind_addr" + envoyTelemetryCollectorBindSocketDir = "envoy_telemetry_collector_bind_socket_dir" + defaultNS = "default" // clusterIPTaggedAddressName is the key for the tagged address to store the service's cluster IP and service port // in Consul. Note: This value should not be changed without a corresponding change in Consul. @@ -480,7 +481,7 @@ func (r *Controller) createServiceRegistrations(pod corev1.Pod, serviceEndpoints } if r.EnableTelemetryCollector { - proxyConfig.Config["envoy_telemetry_bind_socket_dir"] = "/consul/connect-inject" + proxyConfig.Config[envoyTelemetryCollectorBindSocketDir] = "/consul/connect-inject" } if consulServicePort > 0 { @@ -763,7 +764,7 @@ func (r *Controller) createGatewayRegistrations(pod corev1.Pod, serviceEndpoints } if r.EnableTelemetryCollector { - service.Proxy.Config["envoy_telemetry_bind_socket_dir"] = "/consul/connect-inject" + service.Proxy.Config[envoyTelemetryCollectorBindSocketDir] = "/consul/service" } serviceRegistration := &api.CatalogRegistration{