| Sketch🕴️ | 620d57b | 2025-07-31 22:31:14 +0400 | [diff] [blame^] | 1 | {{- /* |
| 2 | Copyright Broadcom, Inc. All Rights Reserved. |
| 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 "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 }} |
| 21 | spec: |
| 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 }} |