{{- if (not .Values.image.secretName) }}
apiVersion: v1
kind: Secret
metadata:
  name: {{ template "docker-app.fullname" . }}-regsecret
  labels:
    heritage: {{ .Release.Service }}
    release: {{ .Release.Name }}
    chart: {{ .Chart.Name }}-{{ .Chart.Version }}
    app: {{ template "docker-app.name" . }}
type: kubernetes.io/dockerconfigjson
data:
  .dockerconfigjson: {{ template "imagePullSecret" . }}
{{- end -}}