apiVersion: apps/v1
kind: Deployment
metadata:
    namespace: iot
    name: home-assistant
    labels:
        app.kubernetes.io/name: hass
spec:
    replicas: 1
    selector:
        matchLabels:
            role: home-assistant
    template:
        metadata:
            labels:
                role: home-assistant
        spec:
            containers:
            -   name: home-assistant
                image: homeassistant/home-assistant:stable
                imagePullPolicy: Always
                env:
                -   name: TZ
                    value: America/Chicago
                ports:
                -   containerPort: 8123
                    name: ha-web
                    protocol: TCP
                volumeMounts:
                -   name: home-assistant
                    mountPath: /config
                livenessProbe:
                    httpGet:
                        path: /
                        port: ha-web
                        scheme: HTTP
                    initialDelaySeconds: 60
                    failureThreshold: 5
                    timeoutSeconds: 10
                readinessProbe:
                    httpGet:
                        path: /
                        port: ha-web
                        scheme: HTTP
                    initialDelaySeconds: 60
                    failureThreshold: 5
                    timeoutSeconds: 10
                startupProbe:
                    httpGet:
                        path: /
                        port: ha-web
                        scheme: HTTP
                    failureThreshold: 30
                    periodSeconds: 10
            restartPolicy: Always
            volumes:
            -   name: home-assistant
                nfs:
                    server: 10.152.183.213
                    path: /home-assistant
