blob: b3903136f2ee942ad09faa0f60d43349e0d5a6be [file] [log] [blame]
Oleksandr Kozachenkob0093492023-09-06 21:43:47 +02001{{- /*
2Copyright VMware, Inc.
3SPDX-License-Identifier: APACHE-2.0
4*/}}
5
6{{- if and .Values.metrics.enabled .Values.metrics.prometheusRule.enabled .Values.metrics.prometheusRule.groups}}
7apiVersion: monitoring.coreos.com/v1
8kind: PrometheusRule
9metadata:
10 name: {{ template "common.names.fullname" . }}
11 namespace: {{ default (include "common.names.namespace" .) .Values.metrics.prometheusRule.namespace }}
12 labels: {{- include "common.labels.standard" . | nindent 4 }}
13 app.kubernetes.io/component: keycloak
14 {{- if .Values.metrics.prometheusRule.labels }}
15 {{- include "common.tplvalues.render" (dict "value" .Values.metrics.prometheusRule.labels "context" $) | nindent 4 }}
16 {{- end }}
17 {{- if .Values.commonLabels }}
18 {{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }}
19 {{- end }}
20 {{- if .Values.commonAnnotations }}
21 annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
22 {{- end }}
23spec:
24 groups: {{- include "common.tplvalues.render" (dict "value" .Values.metrics.prometheusRule.groups "context" .) | nindent 4 }}
25{{- end }}