Skip to content

Commit

Permalink
fix tracer value handling
Browse files Browse the repository at this point in the history
  • Loading branch information
waynz0r committed Jan 31, 2024
1 parent 13af33f commit 5194f20
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion internal/assets/manifests/istio-discovery/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 5 additions & 1 deletion internal/assets/manifests/istio-discovery/values.yaml.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ global:
cpu: 100m
memory: 128Mi
includeIPRanges: "*"
tracer: "zipkin"
proxy_init:
image: proxyv2
resources:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ global:
clusterName: demo-cluster2
network: network1
caName: Citadel
proxy:
tracer: zipkin
meshConfig:
connectTimeout: 5s
rootNamespace: istio-system
Expand Down
1 change: 1 addition & 0 deletions internal/components/discovery/testdata/icp-test-cr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,7 @@ spec:
excludeIPRanges: ""
excludeInboundPorts: ""
excludeOutboundPorts: ""
tracer: "zipkin"
proxyInit:
cni:
enabled: true
Expand Down

0 comments on commit 5194f20

Please sign in to comment.