Merge "[AAI] Add model-loader tracing config"
[oom.git] / kubernetes / common / mongodb / templates / prometheusrule.yaml
1 {{- /*
2 Copyright VMware, Inc.
3 SPDX-License-Identifier: APACHE-2.0
4 */}}
5
6 {{- if and .Values.metrics.enabled .Values.metrics.prometheusRule.enabled }}
7 apiVersion: monitoring.coreos.com/v1
8 kind: PrometheusRule
9 metadata:
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 }}
19 spec:
20   groups:
21     - name: {{ include "mongodb.fullname" . }}
22       rules: {{- include "common.tplvalues.render" ( dict "value" .Values.metrics.prometheusRule.rules "context" $ ) | nindent 8 }}
23 {{- end }}