2020-04-16 06:40:14 +00:00
|
|
|
---
|
|
|
|
apiVersion: policy/v1beta1
|
|
|
|
kind: PodSecurityPolicy
|
|
|
|
metadata:
|
|
|
|
name: csi-snapshotter-psp
|
2022-01-17 12:58:38 +00:00
|
|
|
namespace: kube-system
|
2020-04-16 06:40:14 +00:00
|
|
|
spec:
|
|
|
|
allowPrivilegeEscalation: true
|
|
|
|
allowedCapabilities:
|
|
|
|
- "SYS_ADMIN"
|
|
|
|
fsGroup:
|
|
|
|
rule: RunAsAny
|
|
|
|
privileged: true
|
|
|
|
runAsUser:
|
|
|
|
rule: RunAsAny
|
|
|
|
seLinux:
|
|
|
|
rule: RunAsAny
|
|
|
|
supplementalGroups:
|
|
|
|
rule: RunAsAny
|
|
|
|
volumes:
|
|
|
|
- "configMap"
|
|
|
|
- "emptyDir"
|
|
|
|
- "secret"
|
2021-09-17 09:59:56 +00:00
|
|
|
- "projected"
|
2020-04-16 06:40:14 +00:00
|
|
|
- "hostPath"
|
|
|
|
|
|
|
|
---
|
|
|
|
kind: Role
|
|
|
|
apiVersion: rbac.authorization.k8s.io/v1
|
|
|
|
metadata:
|
|
|
|
name: csi-snapshotter-psp
|
2022-01-17 12:58:38 +00:00
|
|
|
# replace with non-kube-system namespace name
|
|
|
|
namespace: kube-system
|
2020-04-16 06:40:14 +00:00
|
|
|
rules:
|
|
|
|
- apiGroups: ["policy"]
|
|
|
|
resources: ["podsecuritypolicies"]
|
|
|
|
verbs: ["use"]
|
|
|
|
resourceNames: ["csi-snapshotter-psp"]
|
|
|
|
|
|
|
|
---
|
|
|
|
kind: RoleBinding
|
|
|
|
apiVersion: rbac.authorization.k8s.io/v1
|
|
|
|
metadata:
|
|
|
|
name: csi-snapshotter-psp
|
2022-01-17 12:58:38 +00:00
|
|
|
# replace with non-kube-system namespace name
|
|
|
|
namespace: kube-system
|
2020-04-16 06:40:14 +00:00
|
|
|
subjects:
|
|
|
|
- kind: ServiceAccount
|
|
|
|
name: snapshot-controller
|
2022-01-17 12:58:38 +00:00
|
|
|
# replace with non-kube-system namespace name
|
|
|
|
namespace: kube-system
|
2020-04-16 06:40:14 +00:00
|
|
|
roleRef:
|
|
|
|
kind: Role
|
|
|
|
name: csi-snapshotter-psp
|
|
|
|
apiGroup: rbac.authorization.k8s.io
|