rancher-partner-charts/charts/kubecost/cost-analyzer/2.4.0/templates/prometheus-alertmanager-con...

22 lines
741 B
YAML

{{ if .Values.global.prometheus.enabled }}
{{- if and .Values.prometheus.alertmanager.enabled (and (empty .Values.prometheus.alertmanager.configMapOverrideName) (empty .Values.prometheus.alertmanager.configFromSecret)) -}}
apiVersion: v1
kind: ConfigMap
metadata:
labels:
{{- include "prometheus.alertmanager.labels" . | nindent 4 }}
name: {{ template "prometheus.alertmanager.fullname" . }}
namespace: {{ .Release.Namespace }}
data:
{{- $root := . -}}
{{- range $key, $value := .Values.prometheus.alertmanagerFiles }}
{{- if $key | regexMatch ".*\\.ya?ml$" }}
{{ $key }}: |
{{ toYaml $value | default "{}" | indent 4 }}
{{- else }}
{{ $key }}: {{ toYaml $value | indent 4 }}
{{- end }}
{{- end -}}
{{- end -}}
{{ end }}