_persistence.tpl 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. {{- define "pgadmin.persistence" -}}
  2. persistence:
  3. config:
  4. enabled: true
  5. type: {{ .Values.pgadminStorage.config.type }}
  6. datasetName: {{ .Values.pgadminStorage.config.datasetName | default "" }}
  7. hostPath: {{ .Values.pgadminStorage.config.hostPath | default "" }}
  8. targetSelector:
  9. pgadmin:
  10. pgadmin:
  11. mountPath: /var/lib/pgadmin
  12. 01-permissions:
  13. mountPath: /mnt/directories/pgadmin
  14. tmp:
  15. enabled: true
  16. type: emptyDir
  17. targetSelector:
  18. pgadmin:
  19. pgadmin:
  20. mountPath: /tmp
  21. {{- range $idx, $storage := .Values.pgadminStorage.additionalStorages }}
  22. {{ printf "pgadmin-%v" (int $idx) }}:
  23. {{- $size := "" -}}
  24. {{- if $storage.size -}}
  25. {{- $size = (printf "%vGi" $storage.size) -}}
  26. {{- end }}
  27. enabled: true
  28. type: {{ $storage.type }}
  29. datasetName: {{ $storage.datasetName | default "" }}
  30. hostPath: {{ $storage.hostPath | default "" }}
  31. server: {{ $storage.server | default "" }}
  32. share: {{ $storage.share | default "" }}
  33. domain: {{ $storage.domain | default "" }}
  34. username: {{ $storage.username | default "" }}
  35. password: {{ $storage.password | default "" }}
  36. size: {{ $size }}
  37. {{- if eq $storage.type "smb-pv-pvc" }}
  38. mountOptions:
  39. - key: noperm
  40. {{- end }}
  41. targetSelector:
  42. pgadmin:
  43. pgadmin:
  44. mountPath: {{ $storage.mountPath }}
  45. 01-permissions:
  46. mountPath: /mnt/directories{{ $storage.mountPath }}
  47. {{- end }}
  48. {{- if .Values.pgadminNetwork.certificateID }}
  49. cert:
  50. enabled: true
  51. type: secret
  52. objectName: pgadmin-cert
  53. defaultMode: "0600"
  54. items:
  55. - key: tls.key
  56. path: server.key
  57. - key: tls.crt
  58. path: server.cert
  59. targetSelector:
  60. pgadmin:
  61. pgadmin:
  62. mountPath: /certs
  63. readOnly: true
  64. scaleCertificate:
  65. pgadmin-cert:
  66. enabled: true
  67. id: {{ .Values.pgadminNetwork.certificateID }}
  68. {{- end }}
  69. {{- end -}}