_pgadmin.tpl 2.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. {{- define "pgadmin.workload" -}}
  2. workload:
  3. pgadmin:
  4. enabled: true
  5. primary: true
  6. type: Deployment
  7. podSpec:
  8. hostNetwork: {{ .Values.pgadminNetwork.hostNetwork }}
  9. securityContext:
  10. fsGroup: 5050
  11. containers:
  12. pgadmin:
  13. enabled: true
  14. primary: true
  15. imageSelector: image
  16. securityContext:
  17. runAsUser: 5050
  18. runAsGroup: 5050
  19. readOnlyRootFilesystem: false
  20. capabilities:
  21. add:
  22. - NET_BIND_SERVICE
  23. env:
  24. PGADMIN_LISTEN_PORT: {{ .Values.pgadminNetwork.webPort }}
  25. PGADMIN_DEFAULT_EMAIL: {{ .Values.pgadminConfig.adminEmail }}
  26. PGADMIN_DEFAULT_PASSWORD: {{ .Values.pgadminConfig.adminPassword }}
  27. PGADMIN_SERVER_JSON_FILE: /var/lib/pgadmin/servers/servers.json
  28. {{ if .Values.pgadminNetwork.certificateID }}
  29. PGADMIN_ENABLE_TLS: true
  30. {{ end }}
  31. {{ with .Values.pgadminConfig.additionalEnvs }}
  32. envList:
  33. {{ range $env := . }}
  34. - name: {{ $env.name }}
  35. value: {{ $env.value }}
  36. {{ end }}
  37. {{ end }}
  38. probes:
  39. {{- $protocol := "http" -}}
  40. {{- if .Values.pgadminNetwork.certificateID -}}
  41. {{- $protocol = "https" -}}
  42. {{- end }}
  43. liveness:
  44. enabled: true
  45. type: {{ $protocol }}
  46. port: "{{ .Values.pgadminNetwork.webPort }}"
  47. path: /misc/ping
  48. readiness:
  49. enabled: true
  50. type: {{ $protocol }}
  51. port: "{{ .Values.pgadminNetwork.webPort }}"
  52. path: /misc/ping
  53. startup:
  54. enabled: true
  55. type: {{ $protocol }}
  56. port: "{{ .Values.pgadminNetwork.webPort }}"
  57. path: /misc/ping
  58. initContainers:
  59. {{- include "ix.v1.common.app.permissions" (dict "containerName" "01-permissions"
  60. "UID" 5050
  61. "GID" 5050
  62. "mode" "check"
  63. "type" "install") | nindent 8 }}
  64. {{- end -}}