_persistance.tpl 2.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. {{- define "piwigo.persistence" -}}
  2. persistence:
  3. config:
  4. enabled: true
  5. type: {{ .Values.piwiStorage.config.type }}
  6. datasetName: {{ .Values.piwiStorage.config.datasetName | default "" }}
  7. hostPath: {{ .Values.piwiStorage.config.hostPath | default "" }}
  8. targetSelector:
  9. piwigo:
  10. piwigo:
  11. mountPath: /config
  12. gallery:
  13. enabled: true
  14. type: {{ .Values.piwiStorage.gallery.type }}
  15. datasetName: {{ .Values.piwiStorage.gallery.datasetName | default "" }}
  16. hostPath: {{ .Values.piwiStorage.gallery.hostPath | default "" }}
  17. targetSelector:
  18. piwigo:
  19. piwigo:
  20. mountPath: /gallery
  21. tmp:
  22. enabled: true
  23. type: emptyDir
  24. targetSelector:
  25. piwigo:
  26. piwigo:
  27. mountPath: /tmp
  28. {{- range $idx, $storage := .Values.piwiStorage.additionalStorages }}
  29. {{ printf "piwi-%v" (int $idx) }}:
  30. {{- $size := "" -}}
  31. {{- if $storage.size -}}
  32. {{- $size = (printf "%vGi" $storage.size) -}}
  33. {{- end }}
  34. enabled: true
  35. type: {{ $storage.type }}
  36. datasetName: {{ $storage.datasetName | default "" }}
  37. hostPath: {{ $storage.hostPath | default "" }}
  38. server: {{ $storage.server | default "" }}
  39. share: {{ $storage.share | default "" }}
  40. domain: {{ $storage.domain | default "" }}
  41. username: {{ $storage.username | default "" }}
  42. password: {{ $storage.password | default "" }}
  43. size: {{ $size }}
  44. {{- if eq $storage.type "smb-pv-pvc" }}
  45. mountOptions:
  46. - key: noperm
  47. {{- end }}
  48. targetSelector:
  49. piwigo:
  50. piwigo:
  51. mountPath: {{ $storage.mountPath }}
  52. {{- end }}
  53. mariadbdata:
  54. enabled: true
  55. type: {{ .Values.piwiStorage.mariadbData.type }}
  56. datasetName: {{ .Values.piwiStorage.mariadbData.datasetName | default "" }}
  57. hostPath: {{ .Values.piwiStorage.mariadbData.hostPath | default "" }}
  58. targetSelector:
  59. # MariaDB pod
  60. mariadb:
  61. # MariaDB container
  62. mariadb:
  63. mountPath: /var/lib/mysql
  64. # MariaDB - Permissions container
  65. permissions:
  66. mountPath: /mnt/directories/mariadb_data
  67. mariadbbackup:
  68. enabled: true
  69. type: {{ .Values.piwiStorage.mariadbBackup.type }}
  70. datasetName: {{ .Values.piwiStorage.mariadbBackup.datasetName | default "" }}
  71. hostPath: {{ .Values.piwiStorage.mariadbBackup.hostPath | default "" }}
  72. targetSelector:
  73. # MariaDB backup pod
  74. mariadbbackup:
  75. # MariaDB backup container
  76. mariadbbackup:
  77. mountPath: /mariadb_backup
  78. # MariaDB - Permissions container
  79. permissions:
  80. mountPath: /mnt/directories/mariadb_backup
  81. {{- end -}}