blob: f9eb392b296a48dbd09815df633d13043946db31 [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 }}
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-rules
17 namespace: {{ .namespace | default $.Release.Namespace }}
18spec:
19 groups:
20 {{- include "loki.ruleGroupToYaml" (tpl ($.Files.Get "src/rules.yaml.tpl") $ | fromYaml).groups | indent 4 }}
21 {{- include "loki.ruleGroupToYaml" .additionalGroups | indent 4 }}
22{{- end }}
23{{- end }}