Skip to content

Commit d9254d7

Browse files
authored
Merge pull request #1668 from ArthurSens/privilege-escalation
jsonnet: explicitly forbid privilege escalation
2 parents 486b95f + 8d2587a commit d9254d7

File tree

3 files changed

+3
-1
lines changed

3 files changed

+3
-1
lines changed

examples/autosharding/statefulset.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@ spec:
5454
initialDelaySeconds: 5
5555
timeoutSeconds: 5
5656
securityContext:
57+
allowPrivilegeEscalation: false
5758
runAsUser: 65534
5859
nodeSelector:
5960
kubernetes.io/os: linux

examples/standard/deployment.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ spec:
4141
initialDelaySeconds: 5
4242
timeoutSeconds: 5
4343
securityContext:
44+
allowPrivilegeEscalation: false
4445
runAsUser: 65534
4546
nodeSelector:
4647
kubernetes.io/os: linux

jsonnet/kube-state-metrics/kube-state-metrics.libsonnet

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@
163163
{ name: 'http-metrics', containerPort: 8080 },
164164
{ name: 'telemetry', containerPort: 8081 },
165165
],
166-
securityContext: { runAsUser: 65534 },
166+
securityContext: { runAsUser: 65534, allowPrivilegeEscalation: false },
167167
livenessProbe: { timeoutSeconds: 5, initialDelaySeconds: 5, httpGet: {
168168
port: 8080,
169169
path: '/healthz',

0 commit comments

Comments
 (0)