_persistence.tpl 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. {{- define "pigallery.persistence" -}}
  2. persistence:
  3. config:
  4. enabled: true
  5. type: {{ .Values.pigalleryStorage.config.type }}
  6. datasetName: {{ .Values.pigalleryStorage.config.datasetName | default "" }}
  7. hostPath: {{ .Values.pigalleryStorage.config.hostPath | default "" }}
  8. targetSelector:
  9. pigallery:
  10. pigallery:
  11. mountPath: /app/data/config
  12. 01-permissions:
  13. mountPath: /mnt/directories/config
  14. db:
  15. enabled: true
  16. type: {{ .Values.pigalleryStorage.db.type }}
  17. datasetName: {{ .Values.pigalleryStorage.db.datasetName | default "" }}
  18. hostPath: {{ .Values.pigalleryStorage.db.hostPath | default "" }}
  19. targetSelector:
  20. pigallery:
  21. pigallery:
  22. mountPath: /app/data/db
  23. 01-permissions:
  24. mountPath: /mnt/directories/db
  25. media:
  26. enabled: true
  27. type: {{ .Values.pigalleryStorage.media.type }}
  28. datasetName: {{ .Values.pigalleryStorage.media.datasetName | default "" }}
  29. hostPath: {{ .Values.pigalleryStorage.media.hostPath | default "" }}
  30. targetSelector:
  31. pigallery:
  32. pigallery:
  33. mountPath: /app/data/media
  34. 01-permissions:
  35. mountPath: /mnt/directories/media
  36. thumbnails:
  37. enabled: true
  38. type: {{ .Values.pigalleryStorage.thumbnails.type }}
  39. datasetName: {{ .Values.pigalleryStorage.thumbnails.datasetName | default "" }}
  40. hostPath: {{ .Values.pigalleryStorage.thumbnails.hostPath | default "" }}
  41. targetSelector:
  42. pigallery:
  43. pigallery:
  44. mountPath: /app/data/thumbnails
  45. 01-permissions:
  46. mountPath: /mnt/directories/thumbnails
  47. {{- range $idx, $storage := .Values.pigalleryStorage.additionalStorages }}
  48. {{ printf "pigallery-%v" (int $idx) }}:
  49. enabled: true
  50. type: {{ $storage.type }}
  51. datasetName: {{ $storage.datasetName | default "" }}
  52. hostPath: {{ $storage.hostPath | default "" }}
  53. targetSelector:
  54. pigallery:
  55. pigallery:
  56. mountPath: {{ $storage.mountPath }}
  57. 01-permissions:
  58. mountPath: /mnt/directories{{ $storage.mountPath }}
  59. {{- end }}
  60. {{- end -}}