{{- $ns := .Release.Namespace }}
{{- $envAll := . }}
{{- if .Values.imagePullSecrets }}

{{range $key, $value := .Values.imagePullSecrets }}
apiVersion: v1
kind: Secret
metadata:
  name: {{ $key }}
  namespace: {{ $ns }}
data:
  .dockerconfigjson: {{ $value | b64enc }}
type: kubernetes.io/dockerconfigjson
{{- end }}

{{- end }}
