Skip to content

Commit e3d99ba

Browse files
authored
Merge pull request kubernetes#2042 from jcpunk/pss-restricted
Add parameters for PodSecurity restricted
2 parents 4efc9d1 + b23f040 commit e3d99ba

File tree

5 files changed

+14
-0
lines changed

5 files changed

+14
-0
lines changed

examples/autosharding/statefulset.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,10 @@ spec:
5959
drop:
6060
- ALL
6161
readOnlyRootFilesystem: true
62+
runAsNonRoot: true
6263
runAsUser: 65534
64+
seccompProfile:
65+
type: RuntimeDefault
6366
nodeSelector:
6467
kubernetes.io/os: linux
6568
serviceAccountName: kube-state-metrics

examples/daemonsetsharding/daemonset.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,10 @@ spec:
5454
drop:
5555
- ALL
5656
readOnlyRootFilesystem: true
57+
runAsNonRoot: true
5758
runAsUser: 65534
59+
seccompProfile:
60+
type: RuntimeDefault
5861
nodeSelector:
5962
kubernetes.io/os: linux
6063
serviceAccountName: kube-state-metrics

examples/daemonsetsharding/deployment.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,10 @@ spec:
4848
drop:
4949
- ALL
5050
readOnlyRootFilesystem: true
51+
runAsNonRoot: true
5152
runAsUser: 65534
53+
seccompProfile:
54+
type: RuntimeDefault
5255
nodeSelector:
5356
kubernetes.io/os: linux
5457
serviceAccountName: kube-state-metrics

examples/standard/deployment.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,10 @@ spec:
4646
drop:
4747
- ALL
4848
readOnlyRootFilesystem: true
49+
runAsNonRoot: true
4950
runAsUser: 65534
51+
seccompProfile:
52+
type: RuntimeDefault
5053
nodeSelector:
5154
kubernetes.io/os: linux
5255
serviceAccountName: kube-state-metrics

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -185,9 +185,11 @@
185185
],
186186
securityContext: {
187187
runAsUser: 65534,
188+
runAsNonRoot: true,
188189
allowPrivilegeEscalation: false,
189190
readOnlyRootFilesystem: true,
190191
capabilities: { drop: ['ALL'] },
192+
seccompProfile: { type: 'RuntimeDefault' },
191193
},
192194
livenessProbe: { timeoutSeconds: 5, initialDelaySeconds: 5, httpGet: {
193195
port: 8080,

0 commit comments

Comments
 (0)