1
0
Fork 0
mirror of https://github.com/kyverno/kyverno.git synced 2024-12-15 17:51:20 +00:00
kyverno/test/policy/validate/policy_validate_healthChecks.yaml

36 lines
785 B
YAML
Raw Normal View History

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