freeleaps-ops/freeleaps/helm-pkg/centralStorage/templates/central-storage/prometheusrule.yaml
2025-10-20 21:31:25 -04:00

38 lines
1.0 KiB
YAML

{{- /*
Copyright Broadcom, Inc. All Rights Reserved.
SPDX-License-Identifier: APACHE-2.0
*/}}
{{- if .Values.central-storage.prometheusRule.enabled }}
apiVersion: monitoring.coreos.com/v1
kind: PrometheusRule
metadata:
name: {{ .Values.central-storage.prometheusRule.name }}
namespace: {{ .Values.central-storage.prometheusRule.namespace | quote }}
{{- with .Values.central-storage.prometheusRule.labels }}
labels:
{{- toYaml . | nindent 4 }}
{{- end }}
spec:
groups:
{{- with .Values.central-storage.prometheusRule.rules }}
- name: {{ $.Values.central-storage.prometheusRule.name }}
rules:
{{- range . }}
- alert: {{ .alert }}
expr: {{ .expr | quote }}
{{- if .for }}
for: {{ .for }}
{{- end }}
{{- if .labels }}
labels:
{{- toYaml .labels | nindent 12 }}
{{- end }}
{{- if .annotations }}
annotations:
{{- toYaml .annotations | nindent 12 }}
{{- end }}
{{- end }}
{{- end }}
{{- end }}