_nodered.tpl 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. {{- define "nodered.workload" -}}
  2. workload:
  3. nodered:
  4. enabled: true
  5. primary: true
  6. type: Deployment
  7. podSpec:
  8. hostNetwork: {{ .Values.noderedNetwork.hostNetwork }}
  9. containers:
  10. nodered:
  11. enabled: true
  12. primary: true
  13. imageSelector: {{ .Values.noderedConfig.imageSelector }}
  14. # https://github.com/node-red/node-red-docker/wiki/Permissions-and-Persistence
  15. securityContext:
  16. runAsUser: 1000
  17. runAsGroup: 1000
  18. env:
  19. PORT: {{ .Values.noderedNetwork.webPort }}
  20. NODE_RED_ENABLE_SAFE_MODE: {{ .Values.noderedConfig.safeMode }}
  21. NODE_RED_ENABLE_PROJECTS: {{ .Values.noderedConfig.enableProjects }}
  22. {{ with .Values.noderedConfig.additionalEnvs }}
  23. envList:
  24. {{ range $env := . }}
  25. - name: {{ $env.name }}
  26. value: {{ $env.value }}
  27. {{ end }}
  28. {{ end }}
  29. probes:
  30. liveness:
  31. enabled: true
  32. type: exec
  33. command:
  34. - /bin/sh
  35. - -c
  36. - |
  37. NODE_OPTIONS=--dns-result-order=ipv4first node /healthcheck.js
  38. readiness:
  39. enabled: true
  40. type: exec
  41. command:
  42. - /bin/sh
  43. - -c
  44. - |
  45. NODE_OPTIONS=--dns-result-order=ipv4first node /healthcheck.js
  46. startup:
  47. enabled: true
  48. type: exec
  49. command:
  50. - /bin/sh
  51. - -c
  52. - |
  53. NODE_OPTIONS=--dns-result-order=ipv4first node /healthcheck.js
  54. initContainers:
  55. {{- include "ix.v1.common.app.permissions" (dict "containerName" "01-permissions"
  56. "UID" 1000
  57. "GID" 1000
  58. "mode" "check"
  59. "type" "install") | nindent 8 }}
  60. {{- end -}}