homeassistant.yaml 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. apiVersion: apps/v1
  2. kind: Deployment
  3. metadata:
  4. name: homeassistant
  5. spec:
  6. replicas: 1
  7. selector:
  8. matchLabels:
  9. name: homeassistant
  10. template:
  11. metadata:
  12. labels:
  13. name: homeassistant
  14. spec:
  15. affinity:
  16. nodeAffinity:
  17. requiredDuringSchedulingIgnoredDuringExecution:
  18. nodeSelectorTerms:
  19. - matchExpressions:
  20. - key: net
  21. operator: In
  22. values:
  23. - local
  24. hostNetwork: true
  25. containers:
  26. - name: homeassistant
  27. image: ghcr.io/home-assistant/home-assistant:stable
  28. imagePullPolicy: "Always"
  29. env:
  30. - name: TZ
  31. value: "Europe/Zurich"
  32. volumeMounts:
  33. - name: homeassistant
  34. mountPath: /config
  35. ports:
  36. - containerPort: 8123
  37. name: http
  38. volumes:
  39. - name: homeassistant
  40. persistentVolumeClaim:
  41. claimName: homeassistant
  42. ---
  43. apiVersion: v1
  44. kind: Service
  45. metadata:
  46. name: homeassistant
  47. spec:
  48. ipFamilyPolicy: PreferDualStack
  49. type: NodePort
  50. selector:
  51. name: homeassistant
  52. ports:
  53. - protocol: TCP
  54. port: 8123
  55. targetPort: http
  56. nodePort: 31823
  57. name: http
  58. ---
  59. apiVersion: v1
  60. kind: PersistentVolumeClaim
  61. metadata:
  62. name: homeassistant
  63. spec:
  64. storageClassName: nfs-vrt
  65. accessModes:
  66. - ReadWriteMany
  67. resources:
  68. requests:
  69. storage: 300Mi