_persistence.tpl 2.2 KB

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