rancher-charts/charts/rancher-project-monitoring/0.2.0+up0.2.1/templates/prometheus/extrasecret.yaml

21 lines
786 B
YAML

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