github.com/verrazzano/verrazzano@v1.7.0/platform-operator/thirdparty/charts/prometheus-community/kube-prometheus-stack/templates/prometheus/additionalPrometheusRules.yaml (about) 1 {{- if or .Values.additionalPrometheusRules .Values.additionalPrometheusRulesMap}} 2 apiVersion: v1 3 kind: List 4 metadata: 5 name: {{ include "kube-prometheus-stack.fullname" $ }}-additional-prometheus-rules 6 namespace: {{ template "kube-prometheus-stack.namespace" . }} 7 items: 8 {{- if .Values.additionalPrometheusRulesMap }} 9 {{- range $prometheusRuleName, $prometheusRule := .Values.additionalPrometheusRulesMap }} 10 - apiVersion: monitoring.coreos.com/v1 11 kind: PrometheusRule 12 metadata: 13 name: {{ template "kube-prometheus-stack.name" $ }}-{{ $prometheusRuleName }} 14 namespace: {{ template "kube-prometheus-stack.namespace" $ }} 15 labels: 16 app: {{ template "kube-prometheus-stack.name" $ }} 17 {{ include "kube-prometheus-stack.labels" $ | indent 8 }} 18 {{- if $prometheusRule.additionalLabels }} 19 {{ toYaml $prometheusRule.additionalLabels | indent 8 }} 20 {{- end }} 21 spec: 22 groups: 23 {{ toYaml $prometheusRule.groups| indent 8 }} 24 {{- end }} 25 {{- else }} 26 {{- range .Values.additionalPrometheusRules }} 27 - apiVersion: monitoring.coreos.com/v1 28 kind: PrometheusRule 29 metadata: 30 name: {{ template "kube-prometheus-stack.name" $ }}-{{ .name }} 31 namespace: {{ template "kube-prometheus-stack.namespace" $ }} 32 labels: 33 app: {{ template "kube-prometheus-stack.name" $ }} 34 {{ include "kube-prometheus-stack.labels" $ | indent 8 }} 35 {{- if .additionalLabels }} 36 {{ toYaml .additionalLabels | indent 8 }} 37 {{- end }} 38 spec: 39 groups: 40 {{ toYaml .groups| indent 8 }} 41 {{- end }} 42 {{- end }} 43 {{- end }}