-
Notifications
You must be signed in to change notification settings - Fork 4
/
kyverno.yaml
38 lines (38 loc) · 1.17 KB
/
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
31
32
33
34
35
36
37
38
apiVersion: kyverno.io/v1
kind: ClusterPolicy
metadata:
name: psp-seccomp
spec:
background: true
validationFailureAction: Enforce
rules:
- name: restrict-seccomp
match:
resources:
kinds:
- Pod
validate:
message: >-
Use of custom Seccomp profiles is disallowed. The fields
spec.securityContext.seccompProfile.type,
spec.containers[*].securityContext.seccompProfile.type,
spec.initContainers[*].securityContext.seccompProfile.type, and
spec.ephemeralContainers[*].securityContext.seccompProfile.type
must not be set, or set to `RuntimeDefault` or `Localhost`.
pattern:
spec:
=(securityContext):
=(seccompProfile):
type: "RuntimeDefault | Localhost"
containers:
- =(securityContext):
=(seccompProfile):
type: "RuntimeDefault | Localhost"
=(initContainers):
- =(securityContext):
=(seccompProfile):
type: "RuntimeDefault | Localhost"
=(ephemeralContainers):
- =(securityContext):
=(seccompProfile):
type: "RuntimeDefault | Localhost"