_persistence.tpl 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106
  1. {{- define "passbolt.persistence" -}}
  2. persistence:
  3. gpg:
  4. enabled: true
  5. {{- include "ix.v1.common.app.storageOptions" (dict "storage" .Values.passboltStorage.gpg) | nindent 4 }}
  6. targetSelector:
  7. passbolt:
  8. passbolt:
  9. mountPath: /etc/passbolt/gpg
  10. {{- if and (eq .Values.passboltStorage.gpg.type "ixVolume")
  11. (not (.Values.passboltStorage.gpg.ixVolumeConfig | default dict).aclEnable) }}
  12. 01-permissions:
  13. mountPath: /mnt/directories/gpg
  14. {{- end }}
  15. jwt:
  16. enabled: true
  17. {{- include "ix.v1.common.app.storageOptions" (dict "storage" .Values.passboltStorage.jwt) | nindent 4 }}
  18. targetSelector:
  19. passbolt:
  20. passbolt:
  21. mountPath: /etc/passbolt/jwt
  22. {{- if and (eq .Values.passboltStorage.jwt.type "ixVolume")
  23. (not (.Values.passboltStorage.jwt.ixVolumeConfig | default dict).aclEnable) }}
  24. 01-permissions:
  25. mountPath: /mnt/directories/jwt
  26. {{- end }}
  27. tmp:
  28. enabled: true
  29. type: emptyDir
  30. targetSelector:
  31. passbolt:
  32. passbolt:
  33. mountPath: /tmp
  34. varrun:
  35. enabled: true
  36. type: emptyDir
  37. targetSelector:
  38. passbolt:
  39. passbolt:
  40. mountPath: /var/run
  41. {{- range $idx, $storage := .Values.passboltStorage.additionalStorages }}
  42. {{ printf "passbolt-%v" (int $idx) }}:
  43. enabled: true
  44. {{- include "ix.v1.common.app.storageOptions" (dict "storage" $storage) | nindent 4 }}
  45. targetSelector:
  46. passbolt:
  47. passbolt:
  48. mountPath: {{ $storage.mountPath }}
  49. {{- if and (eq $storage.type "ixVolume") (not ($storage.ixVolumeConfig | default dict).aclEnable) }}
  50. 01-permissions:
  51. mountPath: /mnt/directories{{ $storage.mountPath }}
  52. {{- end }}
  53. {{- end }}
  54. mariadbdata:
  55. enabled: true
  56. {{- include "ix.v1.common.app.storageOptions" (dict "storage" .Values.passboltStorage.mariadbData) | nindent 4 }}
  57. targetSelector:
  58. # MariaDB pod
  59. mariadb:
  60. # MariaDB container
  61. mariadb:
  62. mountPath: /var/lib/mysql
  63. # MariaDB - Permissions container
  64. permissions:
  65. mountPath: /mnt/directories/mariadb_data
  66. mariadbbackup:
  67. enabled: true
  68. {{/* Remove on the next version (eg 1.2.0+) */}}
  69. {{- if eq .Values.passboltStorage.mariadbBackup.type "emptyDir" }}
  70. {{- $_ := set .Values.passboltStorage.mariadbBackup "emptyDirConfig" (dict "medium" "" "size" "") }}
  71. {{- end }}
  72. {{- include "ix.v1.common.app.storageOptions" (dict "storage" .Values.passboltStorage.mariadbBackup) | nindent 4 }}
  73. targetSelector:
  74. # MariaDB backup pod
  75. mariadbbackup:
  76. # MariaDB backup container
  77. mariadbbackup:
  78. mountPath: /mariadb_backup
  79. # MariaDB - Permissions container
  80. permissions:
  81. mountPath: /mnt/directories/mariadb_backup
  82. {{- if .Values.passboltNetwork.certificateID }}
  83. cert:
  84. enabled: true
  85. type: secret
  86. objectName: passbolt-cert
  87. defaultMode: "0600"
  88. items:
  89. - key: tls.key
  90. path: certificate.key
  91. - key: tls.crt
  92. path: certificate.crt
  93. targetSelector:
  94. passbolt:
  95. passbolt:
  96. mountPath: /etc/passbolt/certs
  97. readOnly: true
  98. scaleCertificate:
  99. passbolt-cert:
  100. enabled: true
  101. id: {{ .Values.passboltNetwork.certificateID }}
  102. {{- end -}}
  103. {{- end -}}