_persistence.tpl 2.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  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. {{- $size := "" -}}
  20. {{- if $storage.size -}}
  21. {{- $size = (printf "%vGi" $storage.size) -}}
  22. {{- end }}
  23. enabled: true
  24. type: {{ $storage.type }}
  25. datasetName: {{ $storage.datasetName | default "" }}
  26. hostPath: {{ $storage.hostPath | default "" }}
  27. server: {{ $storage.server | default "" }}
  28. share: {{ $storage.share | default "" }}
  29. domain: {{ $storage.domain | default "" }}
  30. username: {{ $storage.username | default "" }}
  31. password: {{ $storage.password | default "" }}
  32. size: {{ $size }}
  33. {{- if eq $storage.type "smb-pv-pvc" }}
  34. mountOptions:
  35. - key: noperm
  36. {{- end }}
  37. targetSelector:
  38. wordpress:
  39. wordpress:
  40. mountPath: {{ $storage.mountPath }}
  41. 01-permissions:
  42. mountPath: /mnt/directories{{ $storage.mountPath }}
  43. {{- end }}
  44. tmp:
  45. enabled: true
  46. type: emptyDir
  47. targetSelector:
  48. wordpress:
  49. wordpress:
  50. mountPath: /tmp
  51. varrun:
  52. enabled: true
  53. type: emptyDir
  54. targetSelector:
  55. wordpress:
  56. wordpress:
  57. mountPath: /var/run
  58. mariadbdata:
  59. enabled: true
  60. type: {{ .Values.wpStorage.mariadbData.type }}
  61. datasetName: {{ .Values.wpStorage.mariadbData.datasetName | default "" }}
  62. hostPath: {{ .Values.wpStorage.mariadbData.hostPath | default "" }}
  63. targetSelector:
  64. # MariaDB pod
  65. mariadb:
  66. # MariaDB container
  67. mariadb:
  68. mountPath: /var/lib/mysql
  69. # MariaDB - Permissions container
  70. permissions:
  71. mountPath: /mnt/directories/mariadb_data
  72. mariadbbackup:
  73. enabled: true
  74. type: {{ .Values.wpStorage.mariadbBackup.type }}
  75. datasetName: {{ .Values.wpStorage.mariadbBackup.datasetName | default "" }}
  76. hostPath: {{ .Values.wpStorage.mariadbBackup.hostPath | default "" }}
  77. targetSelector:
  78. # MariaDB backup pod
  79. mariadbbackup:
  80. # MariaDB backup container
  81. mariadbbackup:
  82. mountPath: /mariadb_backup
  83. # MariaDB - Permissions container
  84. permissions:
  85. mountPath: /mnt/directories/mariadb_backup
  86. {{- end -}}