{{ if .Values.secretEnvVars }}
apiVersion: v1
kind: Secret
metadata:
  name: {{ include "pihole-exporter.fullname" . }}
  labels:
{{ include "pihole-exporter.labels" . | indent 4 }}
type: Opaque
data:
  {{ if .Values.secretEnvVars.PIHOLE_PASSWORD }}
  PIHOLE_PASSWORD:  {{ .Values.secretEnvVars.PIHOLE_PASSWORD | b64enc | quote }}
  {{ end }}
  {{ if .Values.secretEnvVars.PIHOLE_APITOKEN }}
  PIHOLE_APITOKEN:  {{ .Values.secretEnvVars.PIHOLE_APITOKEN | b64enc | quote }}
  {{ end }}
{{ end }}