{{- if .Values.envRenderSecret }} apiVersion: v1 kind: Secret metadata: name: {{ include "grafana.fullname" . }}-env namespace: {{ include "grafana.namespace" . }} labels: {{- include "grafana.labels" . | nindent 4 }} type: Opaque data: {{- range $key, $val := .Values.envRenderSecret }} {{ $key }}: {{ tpl ($val | toString) $ | b64enc | quote }} {{- end }} {{- end }}