From 32869f74e85f2dd9558cd4aa6620fc056091ba2f Mon Sep 17 00:00:00 2001 From: Tower Deploy Date: Mon, 27 Apr 2026 12:38:10 +0300 Subject: [PATCH] Addon init containers: imagePullPolicy=Always so rebuilt images under same tag are picked up --- templates/odoo-deployment.yaml | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/templates/odoo-deployment.yaml b/templates/odoo-deployment.yaml index 3ab7165..00e5b45 100644 --- a/templates/odoo-deployment.yaml +++ b/templates/odoo-deployment.yaml @@ -34,11 +34,20 @@ spec: # which is the shared volume the Odoo container reads from. # Init containers run in order, but each writes to its own # subdir, so order doesn't matter. + # + # `imagePullPolicy: Always` is intentional: addon images can be + # rebuilt under the same {code}:{version} tag (e.g. when Tower's + # build pipeline changes — adding pip-install layer for python + # external_dependencies). With IfNotPresent, kubelet would + # reuse the cached old digest and the pod would never see the + # new content. Always forces a manifest fetch on each pod + # start; layers themselves are still cached so the pull is + # cheap (~50 ms when content is unchanged, fresh otherwise). initContainers: {{- range $i, $a := .Values.addons }} - name: addon-{{ $a.code | replace "_" "-" | lower }} image: {{ $a.image }}:{{ $a.version }} - imagePullPolicy: IfNotPresent + imagePullPolicy: Always volumeMounts: - name: addons mountPath: /target