-
Notifications
You must be signed in to change notification settings - Fork 4
/
kyverno.yaml
30 lines (30 loc) · 938 Bytes
/
kyverno.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
apiVersion: kyverno.io/v1
kind: ClusterPolicy
metadata:
name: pspallowedprocmounttypes
spec:
validationFailureAction: Enforce
rules:
- name: check-proc-mount
match:
resources:
kinds:
- Pod
validate:
message: >-
Changing the proc mount from the default is not allowed. The fields
spec.containers[*].securityContext.procMount and
spec.initContainers[*].securityContext.procMount and
spec.ephemeralContainers[*].securityContext.procMount must not be changed
from `Default`.
pattern:
spec:
=(initContainers):
- =(securityContext):
=(procMount): "Default"
=(ephemeralContainers):
- =(securityContext):
=(procMount): "Default"
containers:
- =(securityContext):
=(procMount): "Default"