_persistance.tpl 2.0 KB

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