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

36 lines
784 B
YAML
Raw Normal View History

2019-07-17 13:31:00 -07:00
apiVersion : kyverno.io/v1alpha1
kind : Policy
metadata :
name: check-probe-exists
spec:
rules:
- name: check-readinessProbe-exists
2019-07-25 14:57:44 -04:00
match:
resources:
kinds :
- Pod
2019-07-17 13:31:00 -07:00
validate:
2019-07-18 00:43:56 -07:00
message: "readinessProbe is required"
2019-07-17 13:31:00 -07:00
pattern:
spec:
containers:
2019-07-21 16:10:34 -07:00
- (name): "check-readiness"
2019-07-17 13:31:00 -07:00
readinessProbe:
2019-07-18 00:43:56 -07:00
successThreshold: ">1"
2019-07-17 13:31:00 -07:00
- name: check-livenessProbe-exists
2019-07-25 14:57:44 -04:00
match:
resources:
kinds :
- Pod
2019-07-17 13:31:00 -07:00
validate:
2019-07-18 00:43:56 -07:00
message: "livenessProbe is required"
2019-07-17 13:31:00 -07:00
pattern:
spec:
containers:
2019-07-21 16:10:34 -07:00
- (name): "check-liveness"
2019-07-17 13:31:00 -07:00
livenessProbe:
httpGet:
path: "?*"
port: "*"
scheme: "?*"