_persistence.tpl 2.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  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. {{- $size := "" -}}
  50. {{- if $storage.size -}}
  51. {{- $size = (printf "%vGi" $storage.size) -}}
  52. {{- end }}
  53. enabled: true
  54. type: {{ $storage.type }}
  55. datasetName: {{ $storage.datasetName | default "" }}
  56. hostPath: {{ $storage.hostPath | default "" }}
  57. server: {{ $storage.server | default "" }}
  58. share: {{ $storage.share | default "" }}
  59. domain: {{ $storage.domain | default "" }}
  60. username: {{ $storage.username | default "" }}
  61. password: {{ $storage.password | default "" }}
  62. size: {{ $size }}
  63. {{- if eq $storage.type "smb-pv-pvc" }}
  64. mountOptions:
  65. - key: noperm
  66. {{- end }}
  67. targetSelector:
  68. pigallery:
  69. pigallery:
  70. mountPath: {{ $storage.mountPath }}
  71. 01-permissions:
  72. mountPath: /mnt/directories{{ $storage.mountPath }}
  73. {{- end }}
  74. {{- end -}}