Skip to content

Commit

Permalink
(fleet/kyverno) add alerts
Browse files Browse the repository at this point in the history
  • Loading branch information
jhoblitt committed Jun 20, 2024
1 parent 47a07f7 commit 5bb52ac
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions fleet/lib/kyverno-conf/prometheusrule-kyverno.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
---
apiVersion: monitoring.coreos.com/v1
kind: PrometheusRule
metadata:
labels:
lsst.io/rule: "true"
name: kyverno
spec:
groups:
- name: kyverno.rules
rules:
- alert: KyvernoPolicyExecutionDurationHigh
annotations:
summary: High mean Kyverno policy execution time of {{ $value }} seconds
expr: sum(kyverno_policy_execution_duration_seconds_sum{cluster=~".*"}) / sum(kyverno_policy_execution_duration_seconds_count{cluster=~".*"}) > 0.1
for: 15s
labels:
severity: warning

- alert: KyvernoDeploymentIsOnFire
annotations:
summary: Kyverno deployment {{ $labels.namespace }}/{{ $labels.deployment }} is on fire
# XXX is this the correct way to determine if a deployment is unhappy?
expr: kube_deployment_status_condition{namespace="kyverno",condition="Available",status="true"} != 1
for: 5m
labels:
severity: warning

0 comments on commit 5bb52ac

Please sign in to comment.