Skip to content

Commit 5b22d29

Browse files
committed
chore(docs): Include serviceAccountNamespace for tracing collector
This separates out the service account namespace from the name to make it clearer how to set the correct service account for the trace collector. Signed-off-by: Scott Fleener <[email protected]>
1 parent 5f0a72e commit 5b22d29

23 files changed

+36
-8
lines changed

charts/linkerd-control-plane/values.yaml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -288,10 +288,13 @@ proxy:
288288
endpoint: ""
289289
# -- The identity of the collector in the linkerd mesh.
290290
meshIdentity:
291-
# -- Service account name for the trace collector. For most cases, this will be
292-
# "<collector service name>.<namespace>", e.g. For a service `collector` in the `monitoring` namespace,
293-
# this should be set to `collector.monitoring`.
291+
# -- Service account name for the trace collector. If there's no explicitly set service account for the trace
292+
# collector, this will be the name of the deployment/stateful set/daemonset of the trace collector instead.
294293
serviceAccountName: ""
294+
# -- Service account namespace for the trace collector. If there's no explicitly set service account for the
295+
# trace collector, this will be the namespace of the deployment/stateful set/daemonset of the trace collector
296+
# instead.
297+
serviceAccountNamespace: ""
295298
inbound:
296299
server:
297300
http2:

charts/partials/templates/_proxy.tpl

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -160,10 +160,14 @@ env:
160160
{{- end }}
161161
- name: LINKERD2_PROXY_TRACE_COLLECTOR_SVC_ADDR
162162
value: {{ .Values.proxy.tracing.collector.endpoint }}
163-
{{ if .Values.proxy.tracing.collector.meshIdentity.serviceAccountName -}}
163+
{{- if empty .Values.proxy.tracing.collector.meshIdentity.serviceAccountName }}
164+
{{- fail "proxy.tracing.collector.meshIdentity.serviceAccountName must be set if proxy tracing is enabled" }}
165+
{{- end }}
166+
{{- if empty .Values.proxy.tracing.collector.meshIdentity.serviceAccountNamespace }}
167+
{{- fail "proxy.tracing.collector.meshIdentity.serviceAccountNamespace must be set if proxy tracing is enabled" }}
168+
{{- end }}
164169
- name: LINKERD2_PROXY_TRACE_COLLECTOR_SVC_NAME
165-
value: {{ .Values.proxy.tracing.collector.meshIdentity.serviceAccountName }}.serviceaccount.identity.{{.Release.Namespace}}.{{ .Values.clusterDomain }}
166-
{{ end -}}
170+
value: {{ .Values.proxy.tracing.collector.meshIdentity.serviceAccountName }}.{{ .Values.proxy.tracing.collector.meshIdentity.serviceAccountNamespace }}.serviceaccount.identity.{{.Release.Namespace}}.{{ .Values.clusterDomain }}
167171
- name: LINKERD2_PROXY_TRACE_EXTRA_ATTRIBUTES
168172
value: |
169173
k8s.pod.ip=$(_pod_ip)

cli/cmd/install_test.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,8 @@ func TestRender(t *testing.T) {
130130
Collector: &charts.ProxyTracingCollector{
131131
Endpoint: "",
132132
MeshIdentity: &charts.ProxyTracingCollectorIdentity{
133-
ServiceAccountName: "",
133+
ServiceAccountName: "",
134+
ServiceAccountNamespace: "",
134135
},
135136
},
136137
},

cli/cmd/testdata/install_controlplane_tracing_output.golden

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

cli/cmd/testdata/install_custom_domain.golden

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

cli/cmd/testdata/install_custom_registry.golden

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

cli/cmd/testdata/install_default.golden

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

cli/cmd/testdata/install_default_override_dst_get_nets.golden

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

cli/cmd/testdata/install_default_token.golden

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

cli/cmd/testdata/install_gid_output.golden

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)