2019-11-13 21:56:20 +00:00
|
|
|
apiVersion : kyverno.io/v1
|
2019-09-03 21:51:51 +00:00
|
|
|
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: "?*"
|