blob: 00df349fcdfe92cc29647d762425df803e6eebcb [file] [log] [blame]
Andreas Geisslercde4a782024-02-28 16:08:06 +01001{{- /*
2Copyright VMware, Inc.
3SPDX-License-Identifier: APACHE-2.0
4*/}}
5
6{{- if and .Values.metrics.enabled .Values.metrics.prometheusRule.enabled }}
7apiVersion: monitoring.coreos.com/v1
8kind: PrometheusRule
9metadata:
10 name: {{ include "mongodb.fullname" . }}
11 namespace: {{ include "mongodb.prometheusRule.namespace" . }}
12 labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }}
13 {{- if .Values.metrics.prometheusRule.additionalLabels }}
14 {{- include "common.tplvalues.render" (dict "value" .Values.metrics.prometheusRule.additionalLabels "context" $) | nindent 4 }}
15 {{- end }}
16 {{- if .Values.commonAnnotations }}
17 annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
18 {{- end }}
19spec:
20 groups:
21 - name: {{ include "mongodb.fullname" . }}
22 rules: {{- include "common.tplvalues.render" ( dict "value" .Values.metrics.prometheusRule.rules "context" $ ) | nindent 8 }}
23{{- end }}