How to pull a docker image from a private docker registry using Helm?
Based on this Github documentation it is possible to pull a docker image from a private docker registry:

values.yaml

imageCredentials:
  name: credentials-name
  registry: private-docker-registry
  username: user
  password: pass


templates/imagePullSecret.yaml

{{- define "imagePullSecret" }}
{{- printf "{\"auths\": {\"%s\": {\"auth\": \"%s\"}}}" .Values.imageCredentials.registry (printf "%s:%s" .Values.imageCredentials.username .Values.imageCredentials.password | b64enc) | b64enc }}
{{- end }}


templates/secret.yaml

apiVersion: v1
kind: Secret
metadata:
  name: {{ .Values.imageCredentials.name }}
type: kubernetes.io/dockerconfigjson
data:
  .dockerconfigjson: {{ template "imagePullSecret" . }}


at the end of the templates/deployment.yaml add the following:

imagePullSecrets:
  - name: {{ .Values.imageCredentials.name }}