Skip to content

Commit e7aac5a

Browse files
committed
added podSecurityPolicy to allow access to hostPath
1 parent 839e37d commit e7aac5a

File tree

2 files changed

+24
-1
lines changed

2 files changed

+24
-1
lines changed

ldp/deploy/rbac/clusterrole.yaml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,4 +18,8 @@ rules:
1818
verbs: ["list", "watch", "create", "update", "patch"]
1919
- apiGroups: [""]
2020
resources: ["nodes"]
21-
verbs: ["list", "watch", "get"]
21+
verbs: ["list", "watch", "get"]
22+
- apiGroups: ['policy']
23+
resources: ['podsecuritypolicies']
24+
verbs: ['use']
25+
resourceNames: ['local-directory-provisioner']
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
apiVersion: policy/v1beta1
2+
kind: PodSecurityPolicy
3+
metadata:
4+
name: local-directory-provisioner
5+
spec:
6+
runAsUser:
7+
rule: 'RunAsAny'
8+
seLinux:
9+
rule: 'RunAsAny'
10+
supplementalGroups:
11+
rule: 'RunAsAny'
12+
fsGroup:
13+
rule: 'RunAsAny'
14+
volumes:
15+
- projected
16+
- secret
17+
- hostPath
18+
allowedHostPaths:
19+
- pathPrefix: /mnt/ssd

0 commit comments

Comments
 (0)