blob: f3333df88eaa80711a17052d7a6ba88f7acbae1e [file] [log] [blame]
Mohammed Naser8a2c8fb2023-02-19 17:23:55 +00001{{- with .Values.monitoring.rules }}
2{{- if and ($.Capabilities.APIVersions.Has "monitoring.coreos.com/v1/PrometheusRule") .enabled .alerting }}
3---
4apiVersion: monitoring.coreos.com/v1
5kind: PrometheusRule
6metadata:
7 labels:
8 {{- include "loki.labels" $ | nindent 4 }}
9 {{- with .labels }}
10 {{- toYaml . | nindent 4 }}
11 {{- end }}
12 {{- with .annotations }}
13 annotations:
14 {{- toYaml . | nindent 4 }}
15 {{- end }}
16 name: {{ include "loki.fullname" $ }}-loki-alerts
17 namespace: {{ .namespace | default $.Release.Namespace }}
18spec:
19 groups:
Giovanni Tirloni59219b62024-04-09 14:50:25 -030020 {{- include "loki.ruleGroupToYaml" (tpl ($.Files.Get "src/alerts.yaml.tpl") $ | fromYaml).groups | indent 4 }}
Mohammed Naser8a2c8fb2023-02-19 17:23:55 +000021{{- end }}
22{{- end }}