homeassistant.yaml 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. ---
  2. apiVersion: v1
  3. kind: PersistentVolumeClaim
  4. metadata:
  5. name: homeassistant-pvc
  6. namespace: smarthome
  7. spec:
  8. accessModes:
  9. - ReadWriteMany
  10. storageClassName: nfs
  11. resources:
  12. requests:
  13. storage: 10Gi
  14. ---
  15. apiVersion: v1
  16. kind: Service
  17. metadata:
  18. name: homeassistant-service
  19. namespace: smarthome
  20. spec:
  21. selector:
  22. app: homeassistant
  23. ports:
  24. - port: 8123
  25. targetPort: 8123
  26. type: ClusterIP
  27. ---
  28. apiVersion: apps/v1
  29. kind: Deployment
  30. metadata:
  31. name: homeassistant-deployment
  32. namespace: smarthome
  33. spec:
  34. replicas: 1
  35. selector:
  36. matchLabels:
  37. app: homeassistant
  38. strategy:
  39. type: Recreate
  40. template:
  41. metadata:
  42. labels:
  43. app: homeassistant
  44. spec:
  45. containers:
  46. - name: homeassistant
  47. image: homeassistant/home-assistant:stable
  48. ports:
  49. - containerPort: 8123
  50. volumeMounts:
  51. - mountPath: /config
  52. name: homeassistant-pvc
  53. restartPolicy: Always
  54. volumes:
  55. - name: homeassistant-pvc
  56. persistentVolumeClaim:
  57. claimName: homeassistant-pvc