_home-assistant.tpl 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  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. privileged: {{ .Values.haConfig.allowDevices | default false }}
  21. allowPrivilegeEscalation: {{ .Values.haConfig.allowDevices | default false }}
  22. readOnlyRootFilesystem: false
  23. capabilities:
  24. add:
  25. - CHOWN
  26. - DAC_OVERRIDE
  27. - FOWNER
  28. - NET_BIND_SERVICE
  29. - NET_RAW
  30. fixedEnv:
  31. PUID: {{ .Values.haID.user }}
  32. {{ with .Values.haConfig.additionalEnvs }}
  33. envList:
  34. {{ range $env := . }}
  35. - name: {{ $env.name }}
  36. value: {{ $env.value }}
  37. {{ end }}
  38. {{ end }}
  39. probes:
  40. liveness:
  41. enabled: true
  42. type: http
  43. path: /manifest.json
  44. port: 8123
  45. readiness:
  46. enabled: true
  47. type: http
  48. path: /manifest.json
  49. port: 8123
  50. startup:
  51. enabled: true
  52. type: http
  53. path: /manifest.json
  54. port: 8123
  55. initContainers:
  56. 01-init-config:
  57. enabled: true
  58. type: init
  59. imageSelector: yqImage
  60. securityContext:
  61. runAsUser: 0
  62. runAsGroup: 0
  63. runAsNonRoot: false
  64. readOnlyRootFilesystem: false
  65. capabilities:
  66. add:
  67. - CHOWN
  68. - DAC_OVERRIDE
  69. - FOWNER
  70. command: /default/init/script.sh
  71. {{- include "ix.v1.common.app.postgresWait" (dict "name" "postgres-wait"
  72. "secretName" "postgres-creds") | nindent 8 }}
  73. {{- end -}}