_persistence.tpl 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. {{- define "firefly.persistence" -}}
  2. persistence:
  3. uploads:
  4. enabled: true
  5. {{- include "firefly.storage.ci.migration" (dict "storage" .Values.fireflyStorage.uploads) }}
  6. {{- include "ix.v1.common.app.storageOptions" (dict "storage" .Values.fireflyStorage.uploads) | nindent 4 }}
  7. targetSelector:
  8. firefly:
  9. firefly:
  10. mountPath: /var/www/html/storage/upload
  11. tmp:
  12. enabled: true
  13. type: emptyDir
  14. targetSelector:
  15. firefly:
  16. firefly:
  17. mountPath: /tmp
  18. firefly-importer:
  19. firefly-importer:
  20. mountPath: /tmp
  21. {{- range $idx, $storage := .Values.fireflyStorage.additionalStorages }}
  22. {{ printf "firefly-%v:" (int $idx) }}
  23. enabled: true
  24. {{- include "ix.v1.common.app.storageOptions" (dict "storage" $storage) | nindent 4 }}
  25. targetSelector:
  26. firefly:
  27. firefly:
  28. mountPath: {{ $storage.mountPath }}
  29. {{- end }}
  30. {{- include "firefly.storage.ci.migration" (dict "storage" .Values.fireflyStorage.pgData) }}
  31. {{- include "firefly.storage.ci.migration" (dict "storage" .Values.fireflyStorage.pgBackup) }}
  32. {{- include "ix.v1.common.app.postgresPersistence"
  33. (dict "pgData" .Values.fireflyStorage.pgData
  34. "pgBackup" .Values.fireflyStorage.pgBackup
  35. ) | nindent 2 }}
  36. {{- end -}}
  37. {{/* TODO: Remove on the next version bump, eg 1.1.0+ */}}
  38. {{- define "firefly.storage.ci.migration" -}}
  39. {{- $storage := .storage -}}
  40. {{- if $storage.hostPath -}}
  41. {{- $_ := set $storage "hostPathConfig" dict -}}
  42. {{- $_ := set $storage.hostPathConfig "hostPath" $storage.hostPath -}}
  43. {{- end -}}
  44. {{- end -}}