blob: 2a618eea207c6969a0ddef3724ba2c06d1085008 [file] [log] [blame]
Sketch🕴️620d57b2025-07-31 22:31:14 +04001{{- /*
2Copyright Broadcom, Inc. All Rights Reserved.
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 "common.names.fullname" . }}
11 namespace: {{ default (include "common.names.namespace" .) .Values.metrics.prometheusRule.namespace | quote }}
12 labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }}
13 app.kubernetes.io/component: metrics
14 {{- if .Values.metrics.prometheusRule.additionalLabels }}
15 {{- include "common.tplvalues.render" ( dict "value" .Values.metrics.prometheusRule.additionalLabels "context" $ ) | nindent 4 }}
16 {{- end }}
17 {{- if .Values.commonAnnotations }}
18 annotations:
19 {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
20 {{- end }}
21spec:
22 groups:
23 - name: {{ include "common.names.fullname" . }}
24 rules:
25 {{- include "common.tplvalues.render" ( dict "value" .Values.metrics.prometheusRule.rules "context" $ ) | nindent 8 }}
26{{- end }}