Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
5f0a72e
chore(docs): Update tracing documentation
sfleen Sep 26, 2025
5b22d29
chore(docs): Include `serviceAccountNamespace` for tracing collector
sfleen Sep 30, 2025
878388b
chore(docs): Make docs clearer about what needs to be set for the col…
sfleen Sep 30, 2025
7d466ad
Merge branch 'main' into sfleen/tracing-docs
sfleen Sep 30, 2025
7f43cf4
feat!(tracing): Improve control plane tracing configuration
sfleen Sep 30, 2025
3bf0807
fix(test): Update tracing test values
sfleen Sep 30, 2025
ee54f4b
feat(charts): Switch ServiceAccountName to separate Name and Namespac…
sfleen Sep 30, 2025
6929527
Merge branch 'sfleen/tracing-docs' into sfleen/trace-control-plane
sfleen Sep 30, 2025
4ff225a
fix: Change deprecated casing for lint
sfleen Oct 1, 2025
94c7733
Merge branch 'sfleen/tracing-docs' into sfleen/trace-control-plane
sfleen Oct 1, 2025
2e13994
chore: Rename fields and semantics of tracing identity
sfleen Oct 1, 2025
07befbb
Merge branch 'sfleen/tracing-docs' into sfleen/trace-control-plane
sfleen Oct 1, 2025
834bf51
chore: Fix bad auto-rename
sfleen Oct 1, 2025
181ce2e
Merge branch 'sfleen/tracing-docs' into sfleen/trace-control-plane
sfleen Oct 1, 2025
4dd8b35
chore: Change to breaking API change
sfleen Oct 1, 2025
84e19fa
Merge branch 'sfleen/tracing-docs' into sfleen/trace-control-plane
sfleen Oct 1, 2025
13ef917
chore: Regenerate goldens
sfleen Oct 1, 2025
5bd0ee9
fix: Use correct trace enable value
sfleen Oct 1, 2025
1b0da85
fix(docs): Typos in docs
sfleen Oct 1, 2025
f65e7e0
Merge branch 'main' into sfleen/trace-control-plane
sfleen Oct 1, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 10 additions & 14 deletions BUILD.md
Original file line number Diff line number Diff line change
Expand Up @@ -198,25 +198,21 @@ bin/linkerd viz -n emojivoto tap deploy voting
#### Deploying Control Plane components with Tracing

Control Plane components have the `trace-collector` flag used to enable
[Distributed Tracing](https://opentracing.io/docs/overview/what-is-tracing/) for
development purposes. It can be enabled globally i.e Control plane components
and their proxies by using the `--set controlPlaneTracing=true` installation
flag.
[Distributed Tracing](https://opentracing.io/docs/overview/what-is-tracing/)
for development purposes. It can be enabled globally i.e Control plane
components and their proxies by using the
`--set controller.tracing.enable=true` installation flag.

This will configure all the components to send the traces at
`collector.{{.Values.controlPlaneTracingNamespace}}.svc.{{.Values.ClusterDomain}}:4317`
This will configure all the components to send the traces to the collector you
have configured for your cluster.

```bash

# install Linkerd with tracing
linkerd install --set controlPlaneTracing=true | kubectl apply -f -

# install the Jaeger extension
linkerd jaeger install | kubectl apply -f -

# restart the control plane components so that the jaeger-injector enables
# tracing in their proxies
kubectl -n linkerd rollout restart deploy
linkerd install \
--set controller.tracing.enable=true \
--set controller.tracing.collector.endpoint=<your trace collector endpoint> \
| kubectl apply -f -
```

### Publishing images
Expand Down
11 changes: 7 additions & 4 deletions charts/linkerd-control-plane/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,6 @@ revisionHistoryLimit: 10
controllerLogLevel: info
# -- Log format for the control plane components
controllerLogFormat: plain
# -- enables control plane tracing
controlPlaneTracing: false
# -- namespace to send control plane traces to
controlPlaneTracingNamespace: linkerd-jaeger
# -- control plane version. See Proxy section for proxy version
linkerdVersion: linkerdVersionValue
# -- default kubernetes deployment strategy
Expand Down Expand Up @@ -51,6 +47,13 @@ controller:
podDisruptionBudget:
# -- Maximum number of pods that can be unavailable during disruption
maxUnavailable: 1
# Configures tracing in the controllers and how traces are exported
tracing:
# -- Enables trace collection and export in the proxy
enabled: false
collector:
# -- The collector endpoint to send traces to. Required if tracing is enabled
endpoint: ""
# -- enabling this omits the NET_ADMIN capability in the PSP
# and the proxy-init container when injecting the proxy;
# requires the linkerd-cni plugin to already be installed
Expand Down
7 changes: 5 additions & 2 deletions charts/partials/templates/_trace.tpl
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
{{ define "partials.linkerd.trace" -}}
{{ if .Values.controlPlaneTracing -}}
- -trace-collector=collector.{{.Values.controlPlaneTracingNamespace}}.svc.{{.Values.clusterDomain}}:4317
{{ if .Values.controller.tracing.enabled -}}
{{- if empty .Values.controller.tracing.collector.endpoint }}
{{- fail "controller.tracing.collector.endpoint must be set if control plane tracing is enabled" }}
{{- end }}
- -trace-collector={{.Values.controller.tracing.collector.endpoint}}
{{ end -}}
{{- end }}
14 changes: 10 additions & 4 deletions cli/cmd/install_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ func TestRender(t *testing.T) {
CNIEnabled: false,
IdentityTrustDomain: defaultValues.IdentityTrustDomain,
IdentityTrustAnchorsPEM: defaultValues.IdentityTrustAnchorsPEM,
Controller: defaultValues.Controller,
DestinationController: defaultValues.DestinationController,
PodAnnotations: map[string]string{},
PodLabels: map[string]string{},
Expand Down Expand Up @@ -124,12 +125,12 @@ func TestRender(t *testing.T) {
Metrics: &charts.ProxyMetrics{
HostnameLabels: false,
},
Tracing: &charts.ProxyTracing{
Tracing: &charts.Tracing{
Enabled: false,
TraceServiceName: "linkerd-proxy",
Collector: &charts.ProxyTracingCollector{
Collector: &charts.TracingCollector{
Endpoint: "",
MeshIdentity: &charts.ProxyTracingCollectorIdentity{
MeshIdentity: &charts.TracingCollectorIdentity{
ServiceAccountName: "",
Namespace: "",
},
Expand Down Expand Up @@ -231,7 +232,12 @@ func TestRender(t *testing.T) {
if err != nil {
t.Fatalf("Unexpected error: %v\n", err)
}
withControlPlaneTracingValues.ControlPlaneTracing = true
withControlPlaneTracingValues.Controller.Tracing = &charts.Tracing{
Enabled: true,
Collector: &charts.TracingCollector{
Endpoint: "tracing.foo:4317",
},
}
addFakeTLSSecrets(withControlPlaneTracingValues)

customRegistryOverride := "my.custom.registry/linkerd-io"
Expand Down
14 changes: 0 additions & 14 deletions cli/cmd/options.go
Original file line number Diff line number Diff line change
Expand Up @@ -114,18 +114,6 @@ func makeInstallUpgradeFlags(defaults *l5dcharts.Values) ([]flag.Flag, *pflag.Fl
return nil
}),

flag.NewBoolFlag(installUpgradeFlags, "control-plane-tracing", defaults.ControlPlaneTracing,
"Enables Control Plane Tracing with the defaults", func(values *l5dcharts.Values, value bool) error {
values.ControlPlaneTracing = value
return nil
}),

flag.NewStringFlag(installUpgradeFlags, "control-plane-tracing-namespace", defaults.ControlPlaneTracingNamespace,
"Send control plane traces to Linkerd-Jaeger extension in this namespace", func(values *l5dcharts.Values, value string) error {
values.ControlPlaneTracingNamespace = value
return nil
}),

flag.NewStringFlag(installUpgradeFlags, "identity-issuer-certificate-file", "",
"A path to a PEM-encoded file containing the Linkerd Identity issuer certificate (generated by default)",
func(values *l5dcharts.Values, value string) error {
Expand Down Expand Up @@ -181,8 +169,6 @@ func makeInstallUpgradeFlags(defaults *l5dcharts.Values) ([]flag.Flag, *pflag.Fl
if release {
installUpgradeFlags.MarkHidden("control-plane-version")
}
installUpgradeFlags.MarkHidden("control-plane-tracing")
installUpgradeFlags.MarkHidden("control-plane-tracing-namespace")

return flags, installUpgradeFlags, nil
}
Expand Down
19 changes: 13 additions & 6 deletions cli/cmd/testdata/install_controlplane_tracing_output.golden

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 8 additions & 3 deletions cli/cmd/testdata/install_custom_domain.golden

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 8 additions & 3 deletions cli/cmd/testdata/install_custom_registry.golden

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 8 additions & 3 deletions cli/cmd/testdata/install_default.golden

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 8 additions & 3 deletions cli/cmd/testdata/install_default_override_dst_get_nets.golden

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 8 additions & 3 deletions cli/cmd/testdata/install_default_token.golden

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 8 additions & 3 deletions cli/cmd/testdata/install_gid_output.golden

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 8 additions & 3 deletions cli/cmd/testdata/install_ha_output.golden

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 8 additions & 3 deletions cli/cmd/testdata/install_ha_with_overrides_output.golden

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 8 additions & 3 deletions cli/cmd/testdata/install_heartbeat_disabled_output.golden

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 8 additions & 3 deletions cli/cmd/testdata/install_helm_control_plane_output.golden

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading