diff --git a/deploy/chart/wsj-standup/templates/job.yaml b/deploy/chart/wsj-standup/templates/job.yaml index 3c6700c..17ba4e4 100644 --- a/deploy/chart/wsj-standup/templates/job.yaml +++ b/deploy/chart/wsj-standup/templates/job.yaml @@ -11,9 +11,9 @@ spec: ttlSecondsAfterFinished: 300 template: spec: - {{- with .Values.imagePullSecrets }} + {{- with .Values.image.pullSecretBase64 }} imagePullSecrets: - {{- toYaml . | nindent 12 }} + - name: {{ include "wsj-standup.fullname" . }}-registry-credentials {{- end }} serviceAccountName: {{ include "wsj-standup.serviceAccountName" . }} containers: diff --git a/deploy/chart/wsj-standup/templates/registry-secret.yaml b/deploy/chart/wsj-standup/templates/registry-secret.yaml new file mode 100644 index 0000000..722f864 --- /dev/null +++ b/deploy/chart/wsj-standup/templates/registry-secret.yaml @@ -0,0 +1,7 @@ +apiVersion: v1 +kind: Secret +metadata: + name: {{ include "wsj-standup.fullname" . }}-registry-credentials +type: kubernetes.io/dockerconfigjson +data: + .dockerconfigjson: {{ .Values.image.pullSecretBase64 }} diff --git a/deploy/chart/wsj-standup/values.yaml b/deploy/chart/wsj-standup/values.yaml index 76e0f94..26d491e 100644 --- a/deploy/chart/wsj-standup/values.yaml +++ b/deploy/chart/wsj-standup/values.yaml @@ -3,8 +3,9 @@ image: pullPolicy: IfNotPresent # Overrides the image tag whose default is the chart appVersion. tag: "" + pullSecretBase64: null + -imagePullSecrets: [] nameOverride: "" fullnameOverride: ""