123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119 |
- apiVersion: apps/v1
- kind: Deployment
- metadata:
- name: homeassistant
- namespace: homeassistant
- spec:
- replicas: 1
- selector:
- matchLabels:
- name: homeassistant
- template:
- metadata:
- namespace: homeassistant
- labels:
- name: homeassistant
- spec:
- affinity:
- nodeAffinity:
- requiredDuringSchedulingIgnoredDuringExecution:
- nodeSelectorTerms:
- - matchExpressions:
- - key: net
- operator: In
- values:
- - local
- - key: has_bluetooth
- operator: In
- values:
- - "true"
- hostNetwork: true
- containers:
- - name: homeassistant
- image: ghcr.io/home-assistant/home-assistant:stable
- imagePullPolicy: "Always"
- env:
- - name: TZ
- value: "Europe/Zurich"
- volumeMounts:
- - name: homeassistant
- mountPath: /config
- - name: dbus-socket
- mountPath: /var/run/dbus/system_bus_socket
- ports:
- - containerPort: 8123
- name: http
- volumes:
- - name: homeassistant
- persistentVolumeClaim:
- claimName: homeassistant
- - name: dbus-socket
- hostPath:
- path: /var/run/dbus/system_bus_socket
- type: Socket
- ---
- apiVersion: v1
- kind: Service
- metadata:
- name: homeassistant
- namespace: homeassistant
- spec:
- ipFamilyPolicy: PreferDualStack
- type: NodePort
- selector:
- name: homeassistant
- ports:
- - protocol: TCP
- port: 8123
- targetPort: http
- nodePort: 31823
- name: http
- ---
- apiVersion: v1
- kind: PersistentVolumeClaim
- metadata:
- name: homeassistant
- namespace: homeassistant
- spec:
- storageClassName: nfs-vrt
- accessModes:
- - ReadWriteMany
- resources:
- requests:
- storage: 300Mi
- ---
- apiVersion: networking.k8s.io/v1
- kind: Ingress
- metadata:
- namespace: homeassistant
- name: homeassistant-ingress
- annotations:
- cert-manager.io/cluster-issuer: "letsencrypt"
- acme.cert-manager.io/http01-edit-in-place: "true"
- nginx.org/client-max-body-size: "500m"
- nginx.org/proxy-connect-timeout: "60s"
- nginx.org/proxy-read-timeout: "60s"
- nginx.org/hsts: "True"
- nginx.org/hsts-max-age: "15552000"
- # Uncomment to allow solving HTTP01 challenge
- nginx.org/redirect-to-https: "true"
- nginx.org/location-snippets: |
- proxy_set_header Upgrade $http_upgrade;
- proxy_set_header Connection "upgrade";
- spec:
- tls:
- - hosts:
- - ha.dodges.it
- secretName: ha-le-secret
- rules:
- - host: ha.dodges.it
- http:
- paths:
- - path: /
- pathType: Prefix
- backend:
- service:
- name: homeassistant
- port:
- number: 8123
- ingressClassName: nginx
|