_n8n.tpl 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. {{- define "n8n.workload" -}}
  2. workload:
  3. n8n:
  4. enabled: true
  5. primary: true
  6. type: Deployment
  7. podSpec:
  8. hostNetwork: {{ .Values.n8nNetwork.hostNetwork }}
  9. containers:
  10. n8n:
  11. enabled: true
  12. primary: true
  13. imageSelector: image
  14. securityContext:
  15. runAsUser: {{ .Values.n8nRunAs.user }}
  16. runAsGroup: {{ .Values.n8nRunAs.group }}
  17. runAsNonRoot: false
  18. readOnlyRootFilesystem: false
  19. envFrom:
  20. - secretRef:
  21. name: n8n-creds
  22. - configMapRef:
  23. name: n8n-config
  24. {{ with .Values.n8nConfig.additionalEnvs }}
  25. envList:
  26. {{ range $env := . }}
  27. - name: {{ $env.name }}
  28. value: {{ $env.value }}
  29. {{ end }}
  30. {{ end }}
  31. probes:
  32. {{ $prot := "http" }}
  33. {{ if .Values.n8nNetwork.certificateID }}
  34. {{ $prot = "https" }}
  35. {{ end }}
  36. liveness:
  37. enabled: true
  38. type: {{ $prot }}
  39. path: /healthz
  40. port: {{ .Values.n8nNetwork.webPort }}
  41. readiness:
  42. enabled: true
  43. type: {{ $prot }}
  44. path: /healthz
  45. port: {{ .Values.n8nNetwork.webPort }}
  46. startup:
  47. enabled: true
  48. type: {{ $prot }}
  49. path: /healthz
  50. port: {{ .Values.n8nNetwork.webPort }}
  51. initContainers:
  52. {{- include "ix.v1.common.app.redisWait" (dict "name" "02-redis-wait"
  53. "secretName" "redis-creds") | nindent 8 }}
  54. {{- include "ix.v1.common.app.postgresWait" (dict "name" "03-postgres-wait"
  55. "secretName" "postgres-creds") | nindent 8 }}
  56. {{- end -}}