homeassistant.yaml 1.6 KB

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