Skip to content

Commit

Permalink
use correct envoy config key for telemetry
Browse files Browse the repository at this point in the history
  • Loading branch information
nickethier committed May 30, 2023
1 parent ce43586 commit cf25214
Showing 1 changed file with 6 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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 {
Expand Down Expand Up @@ -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{
Expand Down

0 comments on commit cf25214

Please sign in to comment.