Skip to content

Commit

Permalink
feat(base-cluster): enable velero servicemonitor if prometheus is ena…
Browse files Browse the repository at this point in the history
…bled (#724)

cloes #487
  • Loading branch information
tasches committed Jul 31, 2024
1 parent 1a86629 commit 4482223
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions charts/base-cluster/templates/backup/velero.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -91,4 +91,19 @@ spec:
metrics:
serviceMonitor:
additionalLabels: {{- toYaml .Values.monitoring.labels | nindent 10 }}
{{- if .Values.monitoring.prometheus.enabled }}
enabled: true
{{- end }}
additionalLabels: {{- .Values.monitoring.labels | toYaml | nindent 10 }}
prometheusRule:
enabled: true
additionalLabels: {{- .Values.monitoring.labels | toYaml | nindent 10 }}
spec:
- alert: VeleroBackupFailures
annotations:
message: Velero backup {{ "{{ $labels.schedule }}" }} failed.
expr: velero_backup_last_status{schedule!=""}!=1
for: 15m
labels:
severity: warning
{{- end }}

0 comments on commit 4482223

Please sign in to comment.