mirror of
https://github.com/kyverno/kyverno.git
synced 2024-12-14 11:57:48 +00:00
35 lines
785 B
YAML
35 lines
785 B
YAML
apiVersion : kyverno.io/v1
|
|
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: "?*"
|