Skip to content

Commit 4c8bcdb

Browse files
committed
Updated restricted PodSecurityPolicy example
1 parent a6f2d88 commit 4c8bcdb

File tree

1 file changed

+3
-8
lines changed

1 file changed

+3
-8
lines changed

PodSecurityPolicy/restricted.yaml

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,8 @@ metadata:
99
annotations:
1010
seccomp.security.alpha.kubernetes.io/allowedProfileNames: 'docker/default,runtime/default'
1111
apparmor.security.beta.kubernetes.io/allowedProfileNames: 'runtime/default'
12-
seccomp.security.alpha.kubernetes.io/defaultProfileName: 'runtime/default'
1312
apparmor.security.beta.kubernetes.io/defaultProfileName: 'runtime/default'
1413
spec:
15-
allowedHostPaths:
16-
# This allows "/foo", "/foo/", "/foo/bar" etc., but
17-
# disallows "/fool", "/etc/foo" etc.
18-
# "/foo/../" is never valid.
19-
- pathPrefix: "/foo"
20-
readOnly: true # only allow read-only mounts
2114
allowPrivilegeEscalation: false
2215
# This is redundant with non-root + disallow privilege escalation,
2316
# but we can provide it for defense in depth.
@@ -54,5 +47,7 @@ spec:
5447
- 'projected'
5548
- 'secret'
5649
- 'downwardAPI'
57-
# Assume that persistentVolumes set up by the cluster admin are safe to use.
50+
# Assume that ephemeral CSI drivers & persistentVolumes set up by the cluster admin are safe to use.
5851
- 'persistentVolumeClaim'
52+
- 'csi'
53+
- 'ephemeral'

0 commit comments

Comments
 (0)