Add:
imageCredentials:
registry: quay.io
username: someone
password: sillyness
replace
imagePullSecrets:
{{- toYaml . | nindent 8 }}
with
imagePullSecrets:
- name: {{ include "REPLACE_ME.fullname" . }}
create new file at templates/
{{- define "imagePullSecret" }}
{{- with .Values.imageCredentials }}
{{- printf "{\"auths\":{\"%s\":{\"username\":\"%s\",\"password\":\"%s\",\"auth\":\"%s\"}}}" .registry .username .password (printf "%s:%s" .username .password | b64enc) | b64enc }}
{{- end }}
{{- end }}
apiVersion: v1
kind: Secret
metadata:
name: {{ include "REPLACE_ME.fullname" . }}
type: kubernetes.io/dockerconfigjson
data:
.dockerconfigjson: {{ template "imagePullSecret" . }}
Learn more at Chart Development Tips and Tricks