Odoo deployment: PYTHONPATH=/mnt/extra-addons/.python-deps so baked-in addon python deps are importable

This commit is contained in:
Tower Deploy
2026-04-27 12:30:42 +03:00
parent bad53c4636
commit 9546a243f7

View File

@@ -76,6 +76,17 @@ spec:
secretKeyRef: secretKeyRef:
name: {{ include "instance.fullname" . }}-pg name: {{ include "instance.fullname" . }}-pg
key: POSTGRES_PASSWORD key: POSTGRES_PASSWORD
{{- if .Values.addons }}
# Python packages declared by addons (paramiko, lxml,
# cryptography, …) are baked into each addon's image at
# build time, then materialized into
# /mnt/extra-addons/.python-deps by the init containers.
# PYTHONPATH points Odoo's interpreter at that dir so
# `import paramiko` from inside an addon Just Works without
# the operator ever pip-installing anything at runtime.
- name: PYTHONPATH
value: "{{ .Values.addonsMountPath }}/.python-deps"
{{- end }}
volumeMounts: volumeMounts:
- name: filestore - name: filestore
mountPath: /var/lib/odoo mountPath: /var/lib/odoo