_persistence.tpl 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150
  1. {{- define "immich.persistence" -}}
  2. persistence:
  3. {{/* Data */}}
  4. library:
  5. enabled: true
  6. type: {{ .Values.immichStorage.library.type }}
  7. datasetName: {{ .Values.immichStorage.library.datasetName | default "" }}
  8. hostPath: {{ .Values.immichStorage.library.hostPath | default "" }}
  9. targetSelector:
  10. server:
  11. server:
  12. mountPath: /usr/src/app/upload/library
  13. microservices:
  14. microservices:
  15. mountPath: /usr/src/app/upload/library
  16. uploads:
  17. enabled: true
  18. type: {{ .Values.immichStorage.uploads.type }}
  19. datasetName: {{ .Values.immichStorage.uploads.datasetName | default "" }}
  20. hostPath: {{ .Values.immichStorage.uploads.hostPath | default "" }}
  21. targetSelector:
  22. server:
  23. server:
  24. mountPath: /usr/src/app/upload/upload
  25. microservices:
  26. microservices:
  27. mountPath: /usr/src/app/upload/upload
  28. thumbs:
  29. enabled: true
  30. type: {{ .Values.immichStorage.thumbs.type }}
  31. datasetName: {{ .Values.immichStorage.thumbs.datasetName | default "" }}
  32. hostPath: {{ .Values.immichStorage.thumbs.hostPath | default "" }}
  33. targetSelector:
  34. server:
  35. server:
  36. mountPath: /usr/src/app/upload/thumbs
  37. microservices:
  38. microservices:
  39. mountPath: /usr/src/app/upload/thumbs
  40. profile:
  41. enabled: true
  42. type: {{ .Values.immichStorage.profile.type }}
  43. datasetName: {{ .Values.immichStorage.profile.datasetName | default "" }}
  44. hostPath: {{ .Values.immichStorage.profile.hostPath | default "" }}
  45. targetSelector:
  46. server:
  47. server:
  48. mountPath: /usr/src/app/upload/profile
  49. microservices:
  50. microservices:
  51. mountPath: /usr/src/app/upload/profile
  52. video:
  53. enabled: true
  54. type: {{ .Values.immichStorage.video.type }}
  55. datasetName: {{ .Values.immichStorage.video.datasetName | default "" }}
  56. hostPath: {{ .Values.immichStorage.video.hostPath | default "" }}
  57. targetSelector:
  58. server:
  59. server:
  60. mountPath: /usr/src/app/upload/encoded-video
  61. microservices:
  62. microservices:
  63. mountPath: /usr/src/app/upload/encoded-video
  64. {{- range $idx, $storage := .Values.immichStorage.additionalLibraries }}
  65. {{ printf "immich-%v" (int $idx) }}:
  66. enabled: true
  67. type: hostPath
  68. hostPath: {{ $storage.hostPath | default "" }}
  69. # Host path and mount path MUST be the same
  70. targetSelector:
  71. server:
  72. server:
  73. mountPath: {{ $storage.hostPath }}
  74. microservices:
  75. microservices:
  76. mountPath: {{ $storage.hostPath }}
  77. {{- end }}
  78. {{/* Caches */}}
  79. microcache:
  80. enabled: true
  81. type: emptyDir
  82. targetSelector:
  83. microservices:
  84. microservices:
  85. mountPath: /microcache
  86. {{- if .Values.immichConfig.enableTypesense }}
  87. typsense:
  88. enabled: true
  89. type: emptyDir
  90. targetSelector:
  91. typesense:
  92. typesense:
  93. mountPath: /typesense-data
  94. {{- end -}}
  95. {{- if .Values.immichConfig.enableML }}
  96. mlcache:
  97. enabled: true
  98. type: emptyDir
  99. targetSelector:
  100. machinelearning:
  101. machinelearning:
  102. mountPath: /mlcache
  103. {{- end }}
  104. redis:
  105. enabled: true
  106. type: emptyDir
  107. targetSelector:
  108. redis:
  109. redis:
  110. mountPath: /bitnami/redis/data
  111. tmp:
  112. enabled: true
  113. type: emptyDir
  114. targetSelector:
  115. redis:
  116. redis:
  117. mountPath: /tmp
  118. {{/* Database */}}
  119. postgresdata:
  120. enabled: true
  121. type: {{ .Values.immichStorage.pgData.type }}
  122. datasetName: {{ .Values.immichStorage.pgData.datasetName | default "" }}
  123. hostPath: {{ .Values.immichStorage.pgData.hostPath | default "" }}
  124. targetSelector:
  125. # Postgres pod
  126. postgres:
  127. # Postgres container
  128. postgres:
  129. mountPath: /var/lib/postgresql/data
  130. # Postgres - Permissions container
  131. # Different than the 01-permissions
  132. permissions:
  133. mountPath: /mnt/directories/postgres_data
  134. postgresbackup:
  135. enabled: true
  136. type: {{ .Values.immichStorage.pgBackup.type }}
  137. datasetName: {{ .Values.immichStorage.pgBackup.datasetName | default "" }}
  138. hostPath: {{ .Values.immichStorage.pgBackup.hostPath | default "" }}
  139. targetSelector:
  140. # Postgres backup pod
  141. postgresbackup:
  142. # Postgres backup container
  143. postgresbackup:
  144. mountPath: /postgres_backup
  145. # Postgres - Permissions container
  146. # Different than the 01-permissions
  147. permissions:
  148. mountPath: /mnt/directories/postgres_backup
  149. {{- end -}}