From d8e80548762dfa86a982348d805f82192e1e0b05 Mon Sep 17 00:00:00 2001 From: "lincheng.zhong" Date: Wed, 15 Oct 2025 20:09:50 +0800 Subject: [PATCH] enable imagepullsecrets for better image pull --- charts/podinfo/templates/deployment.yaml | 5 ++++- charts/podinfo/templates/redis/deployment.yaml | 3 +++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/charts/podinfo/templates/deployment.yaml b/charts/podinfo/templates/deployment.yaml index 3607950..44d1107 100644 --- a/charts/podinfo/templates/deployment.yaml +++ b/charts/podinfo/templates/deployment.yaml @@ -35,6 +35,9 @@ spec: - name: {{ .Chart.Name }} image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}" imagePullPolicy: {{ .Values.image.pullPolicy }} + {{- if .Values.imagePullSecrets }} + imagePullSecrets: {{ toYaml .Values.imagePullSecrets | nindent 8 }} + {{- end }} {{- if .Values.securityContext }} securityContext: {{- toYaml .Values.securityContext | nindent 12 }} @@ -223,4 +226,4 @@ spec: {{- with .Values.topologySpreadConstraints }} topologySpreadConstraints: {{- toYaml . | nindent 8 }} - {{- end }} \ No newline at end of file + {{- end }} diff --git a/charts/podinfo/templates/redis/deployment.yaml b/charts/podinfo/templates/redis/deployment.yaml index 7888855..7f9c1ec 100644 --- a/charts/podinfo/templates/redis/deployment.yaml +++ b/charts/podinfo/templates/redis/deployment.yaml @@ -25,6 +25,9 @@ spec: - name: redis image: "{{ .Values.redis.repository }}:{{ .Values.redis.tag }}" imagePullPolicy: IfNotPresent + {{- if .Values.redis.imagePullSecrets }} + imagePullSecrets: {{ toYaml .Values.redis.imagePullSecrets | nindent 8 }} + {{- end }} command: - redis-server - "/redis-master/redis.conf"