Oleksandr Kozachenko | b009349 | 2023-09-06 21:43:47 +0200 | [diff] [blame] | 1 | {{- /* |
| 2 | Copyright VMware, Inc. |
| 3 | SPDX-License-Identifier: APACHE-2.0 |
| 4 | */}} |
| 5 | |
| 6 | {{- if and .Values.metrics.enabled .Values.metrics.prometheusRule.enabled .Values.metrics.prometheusRule.groups}} |
| 7 | apiVersion: monitoring.coreos.com/v1 |
| 8 | kind: PrometheusRule |
| 9 | metadata: |
| 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 }} |
| 23 | spec: |
| 24 | groups: {{- include "common.tplvalues.render" (dict "value" .Values.metrics.prometheusRule.groups "context" .) | nindent 4 }} |
| 25 | {{- end }} |