Files
helm-charts/charts/volsync-target/templates/prometheus-rule.yaml
Alex Lebens 52363a1dbc
All checks were successful
lint-and-test / lint-helm (push) Successful in 30s
release-charts-volsync-target / release (push) Successful in 17s
lint-and-test / chart-testing (push) Successful in 2m50s
renovate / renovate (push) Successful in 1m46s
fix: invalid rules
2026-04-28 17:53:08 -05:00

33 lines
1.2 KiB
YAML

{{- if .Values.prometheusRule.enabled }}
---
apiVersion: monitoring.coreos.com/v1
kind: PrometheusRule
metadata:
name: {{ include "volsync.name" . }}-source-local
namespace: {{ include "volsync.namespace" . }}
labels:
{{- include "volsync.labels" . | nindent 4 }}
app.kubernetes.io/name: {{ include "volsync.name" . }}-source-local
{{- with .Values.additionalLabels }}
{{- toYaml . | nindent 4 }}
{{- end }}
spec:
groups:
- name: volsync.alerts
rules:
- alert: VolSyncBackupPodFailed
expr: |
(kube_pod_container_status_last_terminated_exitcode > 0)
* on(pod, namespace) group_left(owner_name)
kube_pod_owner{owner_kind="Job", owner_name=~"volsync-.*"}
for: 1m
labels:
severity: critical
annotations:
summary: "VolSync Backup Pod failed in {{ `{{ $labels.namespace }}` }}"
description: |
A pod for the VolSync backup of PVC '{{ .Values.pvcTarget }}' failed with exit code {{ `{{ $value }}` }}.
Job: {{ `{{ $labels.owner_name }}` }}
Namespace: {{ `{{ $labels.namespace }}` }}
{{- end }}