From ab0085362cc48b7dba2997dfe29864496ae1dd0d Mon Sep 17 00:00:00 2001 From: geekspeng Date: Mon, 22 Jun 2026 22:33:03 +0800 Subject: [PATCH] fix(helm): apply imagePullPolicy to controller container and promtail sidecar (#4002) Signed-off-by: geekspeng Co-authored-by: Claude Opus 4.7 --- helm/core/templates/_pod.tpl | 4 +++- helm/core/templates/controller-deployment.yaml | 5 +++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/helm/core/templates/_pod.tpl b/helm/core/templates/_pod.tpl index eb090916d..83df34d7a 100644 --- a/helm/core/templates/_pod.tpl +++ b/helm/core/templates/_pod.tpl @@ -211,7 +211,9 @@ template: {{- $config := $o11y.promtail }} - name: promtail image: {{ $config.image.repository | default (printf "%s/higress/promtail" .Values.global.hub) }}:{{ $config.image.tag }} - imagePullPolicy: IfNotPresent + {{- if .Values.global.imagePullPolicy }} + imagePullPolicy: {{ .Values.global.imagePullPolicy }} + {{- end }} args: - -config.file=/etc/promtail/promtail.yaml env: diff --git a/helm/core/templates/controller-deployment.yaml b/helm/core/templates/controller-deployment.yaml index b215c2c08..6257c6595 100644 --- a/helm/core/templates/controller-deployment.yaml +++ b/helm/core/templates/controller-deployment.yaml @@ -39,6 +39,11 @@ spec: securityContext: {{- toYaml .Values.controller.securityContext | nindent 12 }} image: "{{ .Values.controller.hub | default .Values.global.hub }}/higress/{{ .Values.controller.image | default "higress" }}:{{ .Values.controller.tag | default .Chart.AppVersion }}" + {{- if .Values.controller.imagePullPolicy }} + imagePullPolicy: {{ .Values.controller.imagePullPolicy }} + {{- else if .Values.global.imagePullPolicy }} + imagePullPolicy: {{ .Values.global.imagePullPolicy }} + {{- end }} args: - "serve" - --gatewaySelectorKey=higress