Odoo deployment: PYTHONPATH=/mnt/extra-addons/.python-deps so baked-in addon python deps are importable
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user