rancher-charts/charts/rancher-project-monitoring/2.1.0+up0.3.0/templates/alertmanager/extrasecret.yaml

21 lines
802 B
YAML
Raw Normal View History

2023-05-26 21:24:11 +00:00
{{- if .Values.alertmanager.extraSecret.data -}}
{{- $secretName := printf "alertmanager-%s-extra" (include "project-prometheus-stack.fullname" . ) -}}
apiVersion: v1
kind: Secret
metadata:
name: {{ default $secretName .Values.alertmanager.extraSecret.name }}
namespace: {{ template "project-prometheus-stack.namespace" . }}
{{- if .Values.alertmanager.extraSecret.annotations }}
annotations:
{{ toYaml .Values.alertmanager.extraSecret.annotations | indent 4 }}
{{- end }}
labels:
app: {{ template "project-prometheus-stack.name" . }}-alertmanager
app.kubernetes.io/component: alertmanager
{{ include "project-prometheus-stack.labels" . | indent 4 }}
data:
{{- range $key, $val := .Values.alertmanager.extraSecret.data }}
{{ $key }}: {{ $val | b64enc | quote }}
{{- end }}
{{- end }}