{{- if not .Values.dockerRegistryAccountSecret }}
apiVersion: v1
kind: Secret
metadata:
  name: {{ template "spinnaker.fullname" . }}-registry
  labels:
{{ include "spinnaker.standard-labels" . | indent 4 }}
    component: clouddriver
type: Opaque
data:
  {{- range $index, $account := .Values.dockerRegistries }}
  {{ $account.name }}: {{ default "" $account.password | b64enc | quote }}
  {{- end }}
{{- end }}
