{{- if .Values.prometheus }} {{- if .Values.prometheus.serverFiles }} {{- if .Values.prometheus.serverFiles.rules }} {{- if .Values.prometheusRule }} {{- if .Values.prometheusRule.enabled }} apiVersion: monitoring.coreos.com/v1 kind: PrometheusRule metadata: name: {{ include "cost-analyzer.fullname" . }} labels: {{ include "cost-analyzer.commonLabels" . | nindent 4 }} {{- if .Values.prometheusRule.additionalLabels }} {{ toYaml .Values.prometheusRule.additionalLabels | nindent 4 }} {{- end }} spec: {{ toYaml .Values.prometheus.serverFiles.rules | nindent 2 }} {{- end }} {{- end }} {{- end }} {{- end }} {{- end }}