1
0
Fork 0
mirror of https://github.com/kyverno/kyverno.git synced 2024-12-14 11:57:48 +00:00
kyverno/test/policy/validate/policy_validate_healthChecks.yaml
2019-11-13 13:56:20 -08:00

35 lines
785 B
YAML

apiVersion : kyverno.io/v1
kind : ClusterPolicy
metadata :
name: check-probe-exists
spec:
rules:
- name: check-readinessProbe-exists
match:
resources:
kinds :
- Pod
validate:
message: "readinessProbe is required"
pattern:
spec:
containers:
- (name): "check-readiness"
readinessProbe:
successThreshold: ">1"
- name: check-livenessProbe-exists
match:
resources:
kinds :
- Pod
validate:
message: "livenessProbe is required"
pattern:
spec:
containers:
- (name): "check-liveness"
livenessProbe:
httpGet:
path: "?*"
port: "*"
scheme: "?*"