3 SPDX-License-Identifier: APACHE-2.0
6 {{- if and .Values.metrics.enabled .Values.metrics.prometheusRule.enabled }}
7 apiVersion: monitoring.coreos.com/v1
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 }}
16 {{- if .Values.commonAnnotations }}
17 annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
21 - name: {{ include "mongodb.fullname" . }}
22 rules: {{- include "common.tplvalues.render" ( dict "value" .Values.metrics.prometheusRule.rules "context" $ ) | nindent 8 }}