Skip to content

Commit f8faaec

Browse files
authored
fix(tracing): Add more guards and fallback to control plane tracing config (#14650)
This adds more guards to the control plane tracing values. Additionally, this adds a fallback to re-use the proxy tracing endpoint if control plane tracing is enabled without an endpoint set. Signed-off-by: Scott Fleener <[email protected]>
1 parent 1d4d67d commit f8faaec

File tree

2 files changed

+9
-4
lines changed

2 files changed

+9
-4
lines changed

charts/linkerd-control-plane/values.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,9 @@ controller:
5252
# -- Enables trace collection and export in the proxy
5353
enabled: false
5454
collector:
55-
# -- The collector endpoint to send traces to. Required if tracing is enabled
55+
# -- The collector endpoint to send traces to. Required if tracing is
56+
# enabled. If this is unset and `proxy.tracing.collector.endpoint` is set,
57+
# that endpoint will be re-used here.
5658
endpoint: ""
5759
# -- enabling this omits the NET_ADMIN capability in the PSP
5860
# and the proxy-init container when injecting the proxy;
Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,11 @@
11
{{ define "partials.linkerd.trace" -}}
22
{{ if ((.Values.controller.tracing).enabled) -}}
3-
{{- if empty .Values.controller.tracing.collector.endpoint }}
4-
{{- fail "controller.tracing.collector.endpoint must be set if control plane tracing is enabled" }}
5-
{{- end }}
3+
{{- if (.Values.controller.tracing.collector).endpoint }}
64
- -trace-collector={{.Values.controller.tracing.collector.endpoint}}
5+
{{- else if ((.Values.proxy.tracing).collector).endpoint }}
6+
- -trace-collector={{.Values.proxy.tracing.collector.endpoint}}
7+
{{- else }}
8+
{{- fail "controller.tracing.collector.endpoint or proxy.tracing.collector.endpoint must be set if control plane tracing is enabled" }}
9+
{{- end }}
710
{{ end -}}
811
{{- end }}

0 commit comments

Comments
 (0)