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