{{- if .Values.registrySecret.enabled }}
apiVersion: v1
kind: Secret
metadata:
  name: {{ .Values.registrySecret.name }}
  labels:
    {{- include "peikarband.labels" . | nindent 4 }}
type: kubernetes.io/dockerconfigjson
data:
  .dockerconfigjson: {{ printf "{\"auths\":{\"%s\":{\"username\":\"%s\",\"password\":\"%s\",\"auth\":\"%s\"}}}" .Values.registrySecret.server .Values.registrySecret.username .Values.registrySecret.password (printf "%s:%s" .Values.registrySecret.username .Values.registrySecret.password | b64enc) | b64enc }}
{{- end }}

