_joplin.tpl 2.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. {{- define "joplin.workload" -}}
  2. workload:
  3. joplin:
  4. enabled: true
  5. primary: true
  6. type: Deployment
  7. podSpec:
  8. hostNetwork: {{ .Values.joplinNetwork.hostNetwork }}
  9. containers:
  10. joplin:
  11. enabled: true
  12. primary: true
  13. imageSelector: image
  14. securityContext:
  15. runAsUser: 1001
  16. runAsGroup: 1001
  17. readOnlyRootFilesystem: false
  18. env:
  19. APP_PORT: {{ .Values.joplinNetwork.webPort }}
  20. APP_BASE_URL: {{ .Values.joplinConfig.baseUrl }}
  21. DB_CLIENT: pg
  22. POSTGRES_PORT: 5432
  23. POSTGRES_HOST:
  24. secretKeyRef:
  25. name: postgres-creds
  26. key: POSTGRES_HOST
  27. POSTGRES_DATABASE:
  28. secretKeyRef:
  29. name: postgres-creds
  30. key: POSTGRES_DB
  31. POSTGRES_USER:
  32. secretKeyRef:
  33. name: postgres-creds
  34. key: POSTGRES_USER
  35. POSTGRES_PASSWORD:
  36. secretKeyRef:
  37. name: postgres-creds
  38. key: POSTGRES_PASSWORD
  39. {{ with .Values.joplinConfig.additionalEnvs }}
  40. envList:
  41. {{ range $env := . }}
  42. - name: {{ $env.name }}
  43. value: {{ $env.value }}
  44. {{ end }}
  45. {{ end }}
  46. probes:
  47. liveness:
  48. enabled: true
  49. type: http
  50. port: {{ .Values.joplinNetwork.webPort }}
  51. path: /api/ping
  52. httpHeaders:
  53. Host: '{{ .Values.joplinConfig.baseUrl | trimPrefix "https://" | trimPrefix "http://" | trimSuffix "/" }}'
  54. readiness:
  55. enabled: true
  56. type: http
  57. port: {{ .Values.joplinNetwork.webPort }}
  58. path: /api/ping
  59. httpHeaders:
  60. Host: '{{ .Values.joplinConfig.baseUrl | trimPrefix "https://" | trimPrefix "http://" | trimSuffix "/" }}'
  61. startup:
  62. enabled: true
  63. type: http
  64. port: {{ .Values.joplinNetwork.webPort }}
  65. path: /api/ping
  66. httpHeaders:
  67. Host: '{{ .Values.joplinConfig.baseUrl | trimPrefix "https://" | trimPrefix "http://" | trimSuffix "/" }}'
  68. initContainers:
  69. {{- include "ix.v1.common.app.permissions" (dict "containerName" "01-permissions"
  70. "UID" 1001
  71. "GID" 1001
  72. "mode" "check"
  73. "type" "install") | nindent 8 }}
  74. {{- include "ix.v1.common.app.postgresWait" (dict "name" "postgres-wait"
  75. "secretName" "postgres-creds") | nindent 8 }}
  76. {{- end -}}