_persistence.tpl 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118
  1. {{- define "passbolt.persistence" -}}
  2. persistence:
  3. gpg:
  4. enabled: true
  5. type: {{ .Values.passboltStorage.gpg.type }}
  6. datasetName: {{ .Values.passboltStorage.gpg.datasetName | default "" }}
  7. hostPath: {{ .Values.passboltStorage.gpg.hostPath | default "" }}
  8. targetSelector:
  9. passbolt:
  10. passbolt:
  11. mountPath: /etc/passbolt/gpg
  12. 01-permissions:
  13. mountPath: /mnt/directories/gpg
  14. jwt:
  15. enabled: true
  16. type: {{ .Values.passboltStorage.jwt.type }}
  17. datasetName: {{ .Values.passboltStorage.jwt.datasetName | default "" }}
  18. hostPath: {{ .Values.passboltStorage.jwt.hostPath | default "" }}
  19. targetSelector:
  20. passbolt:
  21. passbolt:
  22. mountPath: /etc/passbolt/jwt
  23. 01-permissions:
  24. mountPath: /mnt/directories/jwt
  25. tmp:
  26. enabled: true
  27. type: emptyDir
  28. targetSelector:
  29. passbolt:
  30. passbolt:
  31. mountPath: /tmp
  32. varrun:
  33. enabled: true
  34. type: emptyDir
  35. targetSelector:
  36. passbolt:
  37. passbolt:
  38. mountPath: /var/run
  39. {{- range $idx, $storage := .Values.passboltStorage.additionalStorages }}
  40. {{ printf "passbolt-%v" (int $idx) }}:
  41. {{- $size := "" -}}
  42. {{- if $storage.size -}}
  43. {{- $size = (printf "%vGi" $storage.size) -}}
  44. {{- end }}
  45. enabled: true
  46. type: {{ $storage.type }}
  47. datasetName: {{ $storage.datasetName | default "" }}
  48. hostPath: {{ $storage.hostPath | default "" }}
  49. server: {{ $storage.server | default "" }}
  50. share: {{ $storage.share | default "" }}
  51. domain: {{ $storage.domain | default "" }}
  52. username: {{ $storage.username | default "" }}
  53. password: {{ $storage.password | default "" }}
  54. size: {{ $size }}
  55. {{- if eq $storage.type "smb-pv-pvc" }}
  56. mountOptions:
  57. - key: noperm
  58. {{- end }}
  59. targetSelector:
  60. passbolt:
  61. passbolt:
  62. mountPath: {{ $storage.mountPath }}
  63. 01-permissions:
  64. mountPath: /mnt/directories{{ $storage.mountPath }}
  65. {{- end }}
  66. mariadbdata:
  67. enabled: true
  68. type: {{ .Values.passboltStorage.mariadbData.type }}
  69. datasetName: {{ .Values.passboltStorage.mariadbData.datasetName | default "" }}
  70. hostPath: {{ .Values.passboltStorage.mariadbData.hostPath | default "" }}
  71. targetSelector:
  72. # MariaDB pod
  73. mariadb:
  74. # MariaDB container
  75. mariadb:
  76. mountPath: /var/lib/mysql
  77. # MariaDB - Permissions container
  78. permissions:
  79. mountPath: /mnt/directories/mariadb_data
  80. mariadbbackup:
  81. enabled: true
  82. type: {{ .Values.passboltStorage.mariadbBackup.type }}
  83. datasetName: {{ .Values.passboltStorage.mariadbBackup.datasetName | default "" }}
  84. hostPath: {{ .Values.passboltStorage.mariadbBackup.hostPath | default "" }}
  85. targetSelector:
  86. # MariaDB backup pod
  87. mariadbbackup:
  88. # MariaDB backup container
  89. mariadbbackup:
  90. mountPath: /mariadb_backup
  91. # MariaDB - Permissions container
  92. permissions:
  93. mountPath: /mnt/directories/mariadb_backup
  94. {{- if .Values.passboltNetwork.certificateID }}
  95. cert:
  96. enabled: true
  97. type: secret
  98. objectName: passbolt-cert
  99. defaultMode: "0600"
  100. items:
  101. - key: tls.key
  102. path: certificate.key
  103. - key: tls.crt
  104. path: certificate.crt
  105. targetSelector:
  106. passbolt:
  107. passbolt:
  108. mountPath: /etc/passbolt/certs
  109. readOnly: true
  110. scaleCertificate:
  111. passbolt-cert:
  112. enabled: true
  113. id: {{ .Values.passboltNetwork.certificateID }}
  114. {{- end -}}
  115. {{- end -}}