diff --git a/templates/odoo-deployment.yaml b/templates/odoo-deployment.yaml index 2cc57fd..3ab7165 100644 --- a/templates/odoo-deployment.yaml +++ b/templates/odoo-deployment.yaml @@ -76,6 +76,17 @@ spec: secretKeyRef: name: {{ include "instance.fullname" . }}-pg 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: - name: filestore mountPath: /var/lib/odoo