Skip to content

Commit 9ea05e4

Browse files
authored
Merge pull request #1671 from ArthurSens/readOnlyRootFilesystem
jsonnet: Forbid write access to root filesystem
2 parents d7e618d + d9aaef0 commit 9ea05e4

File tree

3 files changed

+7
-1
lines changed

3 files changed

+7
-1
lines changed

examples/autosharding/statefulset.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ spec:
5555
timeoutSeconds: 5
5656
securityContext:
5757
allowPrivilegeEscalation: false
58+
readOnlyRootFilesystem: true
5859
runAsUser: 65534
5960
nodeSelector:
6061
kubernetes.io/os: linux

examples/standard/deployment.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ spec:
4242
timeoutSeconds: 5
4343
securityContext:
4444
allowPrivilegeEscalation: false
45+
readOnlyRootFilesystem: true
4546
runAsUser: 65534
4647
nodeSelector:
4748
kubernetes.io/os: linux

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

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,11 @@
163163
{ name: 'http-metrics', containerPort: 8080 },
164164
{ name: 'telemetry', containerPort: 8081 },
165165
],
166-
securityContext: { runAsUser: 65534, allowPrivilegeEscalation: false },
166+
securityContext: {
167+
runAsUser: 65534,
168+
allowPrivilegeEscalation: false,
169+
readOnlyRootFilesystem: true,
170+
},
167171
livenessProbe: { timeoutSeconds: 5, initialDelaySeconds: 5, httpGet: {
168172
port: 8080,
169173
path: '/healthz',

0 commit comments

Comments
 (0)