_home-assistant.tpl 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. {{- define "home-assistant.workload" -}}
  2. workload:
  3. home-assistant:
  4. enabled: true
  5. primary: true
  6. type: Deployment
  7. podSpec:
  8. hostNetwork: {{ .Values.haNetwork.hostNetwork }}
  9. securityContext:
  10. fsGroup: {{ .Values.haID.group }}
  11. containers:
  12. home-assistant:
  13. enabled: true
  14. primary: true
  15. imageSelector: image
  16. securityContext:
  17. runAsUser: 0
  18. runAsGroup: 0
  19. runAsNonRoot: false
  20. readOnlyRootFilesystem: false
  21. capabilities:
  22. add:
  23. - NET_BIND_SERVICE
  24. - NET_RAW
  25. fixedEnv:
  26. PUID: {{ .Values.haID.user }}
  27. {{ with .Values.haConfig.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. path: /manifest.json
  39. port: 8123
  40. readiness:
  41. enabled: true
  42. type: http
  43. path: /manifest.json
  44. port: 8123
  45. startup:
  46. enabled: true
  47. type: http
  48. path: /manifest.json
  49. port: 8123
  50. initContainers:
  51. 01-init-config:
  52. enabled: true
  53. type: init
  54. imageSelector: yqImage
  55. securityContext:
  56. runAsUser: 0
  57. runAsGroup: 0
  58. runAsNonRoot: false
  59. readOnlyRootFilesystem: false
  60. command: /default/init/script.sh
  61. {{- include "ix.v1.common.app.postgresWait" (dict "name" "postgres-wait"
  62. "secretName" "postgres-creds") | nindent 8 }}
  63. {{- end -}}