Oleksandr K. | 88f72a2 | 2024-07-25 14:03:19 +0200 | [diff] [blame] | 1 | {{- if .Values.prometheusRule.enabled }} |
| 2 | apiVersion: monitoring.coreos.com/v1 |
| 3 | kind: PrometheusRule |
| 4 | metadata: |
| 5 | name: {{ template "goldpinger.fullname" . }} |
| 6 | {{- if .Values.prometheusRule.namespace }} |
| 7 | namespace: {{ .Values.prometheusRule.namespace }} |
| 8 | {{- else }} |
| 9 | namespace: {{ .Release.Namespace | quote }} |
| 10 | {{- end }} |
| 11 | labels: |
| 12 | {{- include "goldpinger.labels" . | nindent 4 }} |
| 13 | spec: |
| 14 | {{- with .Values.prometheusRule.rules }} |
| 15 | groups: |
| 16 | - name: {{ template "goldpinger.name" $ }} |
| 17 | rules: {{- tpl (toYaml .) $ | nindent 8 }} |
| 18 | {{- end }} |
| 19 | {{- end }} |