2023-09-19 12:28:58 +02:00
|
|
|
---
|
|
|
|
apiVersion: kyverno.io/v1
|
|
|
|
kind: ClusterPolicy
|
|
|
|
metadata:
|
2019-10-14 12:36:19 -07:00
|
|
|
name: check-probe-intervals
|
|
|
|
spec:
|
2023-09-19 12:28:58 +02:00
|
|
|
admission: true
|
|
|
|
background: true
|
2019-10-14 12:36:19 -07:00
|
|
|
rules:
|
2023-09-19 12:28:58 +02:00
|
|
|
- match:
|
|
|
|
any:
|
|
|
|
- resources:
|
|
|
|
kinds:
|
|
|
|
- Deployment
|
|
|
|
name: check-probe-intervals
|
2019-10-14 12:36:19 -07:00
|
|
|
validate:
|
2023-09-19 12:28:58 +02:00
|
|
|
message: livenessProbe must be > 10s
|
2019-10-14 12:36:19 -07:00
|
|
|
pattern:
|
|
|
|
spec:
|
|
|
|
template:
|
|
|
|
spec:
|
|
|
|
containers:
|
2023-09-19 12:28:58 +02:00
|
|
|
- livenessProbe:
|
|
|
|
periodSeconds: '>10'
|
|
|
|
name: '*'
|
|
|
|
- match:
|
|
|
|
any:
|
|
|
|
- resources:
|
|
|
|
kinds:
|
|
|
|
- Deployment
|
|
|
|
name: check-probe-intervals
|
2019-10-14 12:36:19 -07:00
|
|
|
validate:
|
2023-09-19 12:28:58 +02:00
|
|
|
message: readinessProbe must be > 10s
|
2019-10-14 12:36:19 -07:00
|
|
|
pattern:
|
|
|
|
spec:
|
|
|
|
template:
|
|
|
|
spec:
|
|
|
|
containers:
|
2023-09-19 12:28:58 +02:00
|
|
|
- name: '*'
|
|
|
|
readinessProbe:
|
|
|
|
periodSeconds: '>10'
|
|
|
|
validationFailureAction: Audit
|