Skip to content

Commit 75903af

Browse files
Make privilege escalation configurable in Helm (#7521)
Disabling privilege escalation is a security best practice. But currently this is not supported when installing from Helm. A parameter called `privilegeEscalationEnabled` is added to the Helm chart. The default value is `true`to avoid breaking changes to the Helm chart. Fixes #7282 Signed-off-by: Kim Christensen <kimworking@gmail.com>
1 parent c2eac91 commit 75903af

21 files changed

Lines changed: 107 additions & 0 deletions

charts/linkerd-control-plane/templates/destination.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -218,6 +218,7 @@ spec:
218218
{{- end }}
219219
securityContext:
220220
runAsUser: {{.Values.controllerUID}}
221+
allowPrivilegeEscalation: false
221222
- args:
222223
- sp-validator
223224
- -log-level={{.Values.controllerLogLevel}}
@@ -245,6 +246,7 @@ spec:
245246
{{- end }}
246247
securityContext:
247248
runAsUser: {{.Values.controllerUID}}
249+
allowPrivilegeEscalation: false
248250
volumeMounts:
249251
- mountPath: /var/run/linkerd/tls
250252
name: sp-tls
@@ -289,6 +291,7 @@ spec:
289291
{{- end }}
290292
securityContext:
291293
runAsUser: {{.Values.controllerUID}}
294+
allowPrivilegeEscalation: false
292295
volumeMounts:
293296
- mountPath: /var/run/linkerd/tls
294297
name: policy-tls

charts/linkerd-control-plane/templates/heartbeat.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,4 +63,5 @@ spec:
6363
{{- end }}
6464
securityContext:
6565
runAsUser: {{.Values.controllerUID}}
66+
allowPrivilegeEscalation: false
6667
{{- end }}

charts/linkerd-control-plane/templates/identity.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -179,6 +179,7 @@ spec:
179179
{{- end }}
180180
securityContext:
181181
runAsUser: {{.Values.controllerUID}}
182+
allowPrivilegeEscalation: false
182183
volumeMounts:
183184
- mountPath: /var/run/linkerd/identity/issuer
184185
name: identity-issuer

charts/linkerd-control-plane/templates/proxy-injector.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,7 @@ spec:
9797
{{- end }}
9898
securityContext:
9999
runAsUser: {{.Values.controllerUID}}
100+
allowPrivilegeEscalation: false
100101
volumeMounts:
101102
- mountPath: /var/run/linkerd/config
102103
name: config

cli/cmd/testdata/install_controlplane_tracing_output.golden

Lines changed: 6 additions & 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: 6 additions & 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: 6 additions & 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: 6 additions & 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: 6 additions & 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: 6 additions & 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)