diff --git a/internal/assets/manifests/istio-discovery/templates/configmap.yaml b/internal/assets/manifests/istio-discovery/templates/configmap.yaml index ddcd90c51..08661712d 100644 --- a/internal/assets/manifests/istio-discovery/templates/configmap.yaml +++ b/internal/assets/manifests/istio-discovery/templates/configmap.yaml @@ -17,7 +17,7 @@ image: imageType: {{. | quote}} {{- end }} - {{- if ne .Values.global.proxy.tracer "" }} + {{- if and (ne .Values.global.proxy.tracer "") .Values.global.proxy.tracer }} tracing: {{- if eq .Values.global.proxy.tracer "lightstep" }} lightstep: diff --git a/internal/assets/manifests/istio-discovery/values.yaml b/internal/assets/manifests/istio-discovery/values.yaml index 861995d67..6760664b5 100644 --- a/internal/assets/manifests/istio-discovery/values.yaml +++ b/internal/assets/manifests/istio-discovery/values.yaml @@ -374,7 +374,7 @@ global: # Specify which tracer to use. One of: zipkin, lightstep, datadog, stackdriver. # If using stackdriver tracer outside GCP, set env GOOGLE_APPLICATION_CREDENTIALS to the GCP credential file. - tracer: "zipkin" + # tracer: "zipkin" # Controls if sidecar is injected at the front of the container list and blocks the start of the other containers until the proxy is ready holdApplicationUntilProxyStarts: false diff --git a/internal/assets/manifests/istio-discovery/values.yaml.tpl b/internal/assets/manifests/istio-discovery/values.yaml.tpl index 4286c920b..9a5a8c9b9 100644 --- a/internal/assets/manifests/istio-discovery/values.yaml.tpl +++ b/internal/assets/manifests/istio-discovery/values.yaml.tpl @@ -83,9 +83,13 @@ logLevel: {{ .GetSpec.GetProxy.GetLogLevel | toString | lower }} {{ valueIf (dict "key" "holdApplicationUntilProxyStarts" "value" .GetSpec.GetProxy.GetHoldApplicationUntilProxyStarts) }} {{ toYamlIf (dict "value" .GetSpec.GetProxy.GetResources "key" "resources") }} {{ toYamlIf (dict "value" .GetSpec.GetProxy.GetLifecycle "key" "lifecycle") }} -{{- if (and .GetSpec.GetProxy .GetSpec.GetProxy.Tracer) }} +{{- if and .GetSpec.GetProxy .GetSpec.GetProxy.Tracer }} +{{- if ne .GetSpec.GetProxy.GetTracer "" }} {{ valueIf (dict "key" "tracer" "value" .GetSpec.GetProxy.Tracer) }} {{- end }} +{{- else }} +tracer: zipkin +{{- end }} {{- end }} # template for proxy init values diff --git a/internal/components/discovery/testdata/icp-expected-values.yaml b/internal/components/discovery/testdata/icp-expected-values.yaml index f13b3edaa..ba76a522a 100644 --- a/internal/components/discovery/testdata/icp-expected-values.yaml +++ b/internal/components/discovery/testdata/icp-expected-values.yaml @@ -22,6 +22,7 @@ global: cpu: 100m memory: 128Mi includeIPRanges: "*" + tracer: "zipkin" proxy_init: image: proxyv2 resources: diff --git a/internal/components/discovery/testdata/icp-passive-expected-values.yaml b/internal/components/discovery/testdata/icp-passive-expected-values.yaml index 8920c1ce5..b1b575479 100644 --- a/internal/components/discovery/testdata/icp-passive-expected-values.yaml +++ b/internal/components/discovery/testdata/icp-passive-expected-values.yaml @@ -6,6 +6,8 @@ global: clusterName: demo-cluster2 network: network1 caName: Citadel + proxy: + tracer: zipkin meshConfig: connectTimeout: 5s rootNamespace: istio-system diff --git a/internal/components/discovery/testdata/icp-test-cr.yaml b/internal/components/discovery/testdata/icp-test-cr.yaml index b4a22e252..d39413f6d 100644 --- a/internal/components/discovery/testdata/icp-test-cr.yaml +++ b/internal/components/discovery/testdata/icp-test-cr.yaml @@ -176,6 +176,7 @@ spec: excludeIPRanges: "" excludeInboundPorts: "" excludeOutboundPorts: "" + tracer: "zipkin" proxyInit: cni: enabled: true