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