_persistance.tpl 2.4 KB

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