_persistance.tpl 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. {{- define "home-assistant.persistence" -}}
  2. persistence:
  3. config:
  4. enabled: true
  5. {{- include "ix.v1.common.app.storageOptions" (dict "storage" .Values.haStorage.config) | nindent 4 }}
  6. targetSelector:
  7. home-assistant:
  8. home-assistant:
  9. mountPath: /config
  10. 01-init-config:
  11. mountPath: /config
  12. media:
  13. enabled: true
  14. {{- include "ix.v1.common.app.storageOptions" (dict "storage" .Values.haStorage.media) | nindent 4 }}
  15. targetSelector:
  16. home-assistant:
  17. home-assistant:
  18. mountPath: /media
  19. default-config:
  20. enabled: true
  21. type: secret
  22. objectName: ha-config
  23. defaultMode: "0744"
  24. items:
  25. - key: configuration.default
  26. path: configuration.default
  27. - key: recorder.default
  28. path: recorder.default
  29. - key: script.sh
  30. path: script.sh
  31. targetSelector:
  32. home-assistant:
  33. 01-init-config:
  34. mountPath: /default/init
  35. tmp:
  36. enabled: true
  37. type: emptyDir
  38. targetSelector:
  39. home-assistant:
  40. home-assistant:
  41. mountPath: /tmp
  42. {{- range $idx, $storage := .Values.haStorage.additionalStorages }}
  43. {{ printf "ha-%v:" (int $idx) }}
  44. enabled: true
  45. {{- include "ix.v1.common.app.storageOptions" (dict "storage" $storage) | nindent 4 }}
  46. targetSelector:
  47. home-assistant:
  48. home-assistant:
  49. mountPath: {{ $storage.mountPath }}
  50. {{- end }}
  51. {{- include "ix.v1.common.app.postgresPersistence"
  52. (dict "pgData" .Values.haStorage.pgData
  53. "pgBackup" .Values.haStorage.pgBackup
  54. ) | nindent 2 }}
  55. {{- end -}}