diff --git a/charts/bbbatscale-support-notify/templates/_helpers.tpl b/charts/bbbatscale-support-notify/templates/_helpers.tpl index 4b478fd97656f3a3a741faeeca2d1927cd41b1ef..71c6be7bf52c1548075d4e8106d04117de23b928 100644 --- a/charts/bbbatscale-support-notify/templates/_helpers.tpl +++ b/charts/bbbatscale-support-notify/templates/_helpers.tpl @@ -60,3 +60,16 @@ Create the name of the service account to use {{- default "default" .Values.serviceAccount.name }} {{- end }} {{- end }} + +{{- define "bbbatscale-support-notify.dockerConfig" -}} +auths: + {{- $auths := .auths }} + {{- range (keys $auths) }} + {{- $auth := get $auths . }} + {{ quote . }}: + username: {{ quote $auth.username }} + password: {{ quote $auth.password }} + auth: {{ printf "%s:%s" $auth.username $auth.password | b64enc }} + email: {{ get $auth "email" | quote }} + {{- end }} +{{- end -}} diff --git a/charts/bbbatscale-support-notify/templates/image-pull-secret.yaml b/charts/bbbatscale-support-notify/templates/image-pull-secret.yaml new file mode 100644 index 0000000000000000000000000000000000000000..3b35ec3b2a8b77ce11d787c0ef9e0eb4ef226bd8 --- /dev/null +++ b/charts/bbbatscale-support-notify/templates/image-pull-secret.yaml @@ -0,0 +1,9 @@ +apiVersion: v1 +kind: Secret +metadata: + name: {{ include "bbbatscale-support-notify.fullname" . }}-pullsecret + labels: + {{- include "bbbatscale-support-notify.labels" . | nindent 4 }} +type: kubernetes.io/dockerconfigjson +data: + .dockerconfigjson: {{ include "bbbatscale-support-notify.dockerConfig" .Values.imagePullConfig | fromYaml | toJson | b64enc }}