_persistence.tpl 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. {{- define "briefkasten.persistence" -}}
  2. persistence:
  3. tmp:
  4. enabled: true
  5. type: emptyDir
  6. targetSelector:
  7. briefkasten:
  8. briefkasten:
  9. mountPath: /tmp
  10. {{- range $idx, $storage := .Values.briefkastenStorage.additionalStorages }}
  11. {{ printf "briefkasten-%v:" (int $idx) }}
  12. enabled: true
  13. {{- include "briefkasten.storage.ci.migration" (dict "storage" $storage) }}
  14. {{- include "ix.v1.common.app.storageOptions" (dict "storage" $storage) | nindent 4 }}
  15. targetSelector:
  16. briefkasten:
  17. briefkasten:
  18. mountPath: {{ $storage.mountPath }}
  19. {{- if eq $storage.type "ixVolume" }}
  20. 01-permissions:
  21. mountPath: /mnt/directories{{ $storage.mountPath }}
  22. {{- end }}
  23. {{- end -}}
  24. {{- include "briefkasten.storage.ci.migration" (dict "storage" .Values.briefkastenStorage.pgData) }}
  25. {{- include "briefkasten.storage.ci.migration" (dict "storage" .Values.briefkastenStorage.pgBackup) }}
  26. {{- include "ix.v1.common.app.postgresPersistence"
  27. (dict "pgData" .Values.briefkastenStorage.pgData
  28. "pgBackup" .Values.briefkastenStorage.pgBackup
  29. ) | nindent 2 }}
  30. {{- end -}}
  31. {{/* TODO: Remove on the next version bump, eg 1.2.0+ */}}
  32. {{- define "briefkasten.storage.ci.migration" -}}
  33. {{- $storage := .storage -}}
  34. {{- if $storage.hostPath -}}
  35. {{- $_ := set $storage "hostPathConfig" dict -}}
  36. {{- $_ := set $storage.hostPathConfig "hostPath" $storage.hostPath -}}
  37. {{- end -}}
  38. {{- end -}}