_persistence.tpl 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. {{- define "odoo.persistence" -}}
  2. persistence:
  3. data:
  4. enabled: true
  5. {{- include "ix.v1.common.app.storageOptions" (dict "storage" .Values.odooStorage.data) | nindent 4 }}
  6. targetSelector:
  7. odoo:
  8. odoo:
  9. mountPath: /var/lib/odoo
  10. 02-db-init:
  11. mountPath: /var/lib/odoo
  12. addons:
  13. enabled: true
  14. {{- include "ix.v1.common.app.storageOptions" (dict "storage" .Values.odooStorage.addons) | nindent 4 }}
  15. targetSelector:
  16. odoo:
  17. odoo:
  18. mountPath: /mnt/extra-addons
  19. 02-db-init:
  20. mountPath: /mnt/extra-addons
  21. tmp:
  22. enabled: true
  23. type: emptyDir
  24. targetSelector:
  25. odoo:
  26. odoo:
  27. mountPath: /tmp
  28. 02-db-init:
  29. mountPath: /tmp
  30. config:
  31. enabled: true
  32. type: secret
  33. objectName: odoo-config
  34. targetSelector:
  35. odoo:
  36. odoo:
  37. mountPath: /etc/odoo/odoo.conf
  38. readOnly: true
  39. subPath: odoo.conf
  40. 02-db-init:
  41. mountPath: /etc/odoo/odoo.conf
  42. readOnly: true
  43. subPath: odoo.conf
  44. {{- range $idx, $storage := .Values.odooStorage.additionalStorages }}
  45. {{ printf "odoo-%v:" (int $idx) }}
  46. enabled: true
  47. {{- include "ix.v1.common.app.storageOptions" (dict "storage" $storage) | nindent 4 }}
  48. targetSelector:
  49. odoo:
  50. odoo:
  51. mountPath: {{ $storage.mountPath }}
  52. {{- end }}
  53. {{- include "ix.v1.common.app.postgresPersistence"
  54. (dict "pgData" .Values.odooStorage.pgData
  55. "pgBackup" .Values.odooStorage.pgBackup
  56. ) | nindent 2 }}
  57. {{- end -}}