1
0
Fork 0
mirror of https://github.com/kyverno/kyverno.git synced 2025-03-06 16:06:56 +00:00
kyverno/examples/policy_validate_healthChecks.yaml
2019-09-28 14:09:46 -07:00

35 lines
791 B
YAML

apiVersion : kyverno.io/v1alpha1
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: "?*"