apiVersion: apps/v1
kind: StatefulSet
metadata:
  labels:
    app.kubernetes.io/component: server
    app.kubernetes.io/name: homeassistant
    app.kubernetes.io/part-of: homeassistant
    app.kubernetes.io/version: 2021.10.6
  name: homeassistant
  namespace: homeassistant
spec:
  replicas: 1
  selector:
    matchLabels:
      app.kubernetes.io/component: server
      app.kubernetes.io/name: homeassistant
      app.kubernetes.io/part-of: homeassistant
  serviceName: homeassistant
  template:
    metadata:
      labels:
        app.kubernetes.io/component: server
        app.kubernetes.io/name: homeassistant
        app.kubernetes.io/part-of: homeassistant
        app.kubernetes.io/version: 2021.10.6
    spec:
      containers:
      - env:
        - name: TZ
          value: Europe/Berlin
        image: homeassistant/aarch64-homeassistant:2021.10.6
        imagePullPolicy: IfNotPresent
        name: homeassistant
        ports:
        - containerPort: 8123
          name: http
        readinessProbe:
          failureThreshold: 5
          httpGet:
            path: /
            port: http
            scheme: HTTP
          initialDelaySeconds: 60
          timeoutSeconds: 10
        resources:
          limits:
            cpu: 400m
            memory: 1600Mi
          requests:
            cpu: 200m
            memory: 800Mi
        securityContext:
          privileged: false
        volumeMounts:
        - mountPath: /config
          name: config
      hostNetwork: true
      nodeSelector:
        kubernetes.io/arch: arm64
      restartPolicy: Always
      serviceAccountName: homeassistant
      volumes:
      - name: config
        persistentVolumeClaim:
          claimName: config
