1
0
Fork 0
mirror of https://github.com/kyverno/kyverno.git synced 2025-03-09 09:26:54 +00:00
kyverno/test/policy/validate/check_probe_exists.yaml

37 lines
806 B
YAML
Raw Normal View History

2019-11-13 13:56:20 -08:00
apiVersion : kyverno.io/v1
2019-10-14 12:36:19 -07:00
kind : ClusterPolicy
metadata :
name: check-probe-exists
spec:
rules:
- name: check-liveness-probe-exists
match:
resources:
kinds :
- StatefulSet
validate:
message: "a livenessProbe is required"
pattern:
spec:
template:
spec:
containers:
- name: "*"
livenessProbe:
periodSeconds: ">0"
- name: check-readiness-probe-exists
match:
resources:
kinds :
- StatefulSet
validate:
message: "a readinessProbe is required"
pattern:
spec:
template:
spec:
containers:
- name: "*"
readinessProbe:
periodSeconds: ">0"