_vikunja_api.tpl 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. {{- define "vikunja.api" -}}
  2. workload:
  3. vikunja-api:
  4. enabled: true
  5. primary: true
  6. type: Deployment
  7. podSpec:
  8. hostNetwork: false
  9. containers:
  10. vikunja-api:
  11. enabled: true
  12. primary: true
  13. imageSelector: image
  14. securityContext:
  15. runAsUser: {{ .Values.vikunjaRunAs.user }}
  16. runAsGroup: {{ .Values.vikunjaRunAs.group }}
  17. runAsNonRoot: false
  18. env:
  19. # Make vikunja skip user creation
  20. PUID: ""
  21. PGID: ""
  22. envFrom:
  23. - secretRef:
  24. name: vikunja-creds
  25. - configMapRef:
  26. name: vikunja-api
  27. {{ with .Values.vikunjaConfig.additionalEnvs }}
  28. envList:
  29. {{ range $env := . }}
  30. - name: {{ $env.name }}
  31. value: {{ $env.value }}
  32. {{ end }}
  33. {{ end }}
  34. probes:
  35. liveness:
  36. enabled: true
  37. type: http
  38. port: {{ .Values.vikunjaPorts.api }}
  39. path: /health
  40. readiness:
  41. enabled: true
  42. type: http
  43. port: {{ .Values.vikunjaPorts.api }}
  44. path: /health
  45. startup:
  46. enabled: true
  47. type: http
  48. port: {{ .Values.vikunjaPorts.api }}
  49. path: /health
  50. initContainers:
  51. {{- include "ix.v1.common.app.permissions" (dict "containerName" "01-permissions"
  52. "UID" .Values.vikunjaRunAs.user
  53. "GID" .Values.vikunjaRunAs.group
  54. "mode" "check"
  55. "type" "install") | nindent 8 }}
  56. {{- include "ix.v1.common.app.redisWait" (dict "name" "02-redis-wait"
  57. "secretName" "redis-creds") | nindent 8 }}
  58. {{- include "ix.v1.common.app.postgresWait" (dict "name" "03-postgres-wait"
  59. "secretName" "postgres-creds") | nindent 8 }}
  60. {{- end -}}