_persistance.tpl 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  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. enabled: true
  31. type: {{ $storage.type }}
  32. datasetName: {{ $storage.datasetName | default "" }}
  33. hostPath: {{ $storage.hostPath | default "" }}
  34. targetSelector:
  35. piwigo:
  36. piwigo:
  37. mountPath: {{ $storage.mountPath }}
  38. {{- end }}
  39. mariadbdata:
  40. enabled: true
  41. type: {{ .Values.piwiStorage.mariadbData.type }}
  42. datasetName: {{ .Values.piwiStorage.mariadbData.datasetName | default "" }}
  43. hostPath: {{ .Values.piwiStorage.mariadbData.hostPath | default "" }}
  44. targetSelector:
  45. # MariaDB pod
  46. mariadb:
  47. # MariaDB container
  48. mariadb:
  49. mountPath: /var/lib/mysql
  50. # MariaDB - Permissions container
  51. permissions:
  52. mountPath: /mnt/directories/mariadb_data
  53. mariadbbackup:
  54. enabled: true
  55. type: {{ .Values.piwiStorage.mariadbBackup.type }}
  56. datasetName: {{ .Values.piwiStorage.mariadbBackup.datasetName | default "" }}
  57. hostPath: {{ .Values.piwiStorage.mariadbBackup.hostPath | default "" }}
  58. targetSelector:
  59. # MariaDB backup pod
  60. mariadbbackup:
  61. # MariaDB backup container
  62. mariadbbackup:
  63. mountPath: /mariadb_backup
  64. # MariaDB - Permissions container
  65. permissions:
  66. mountPath: /mnt/directories/mariadb_backup
  67. {{- end -}}