apiVersion: apps/v1
kind: Deployment
metadata:
  name: homeassistant
  namespace: default
spec:
  replicas: 3
  selector:
    matchLabels:
      app: homeassistant
  template:
    metadata:
      labels:
        app: homeassistant
    spec:
      containers:
        - name: homeassistant
          image: ghcr.io/home-assistant/raspberrypi4-homeassistant:stable
          volumeMounts:
          - mountPath: /config
            name: data
          securityContext:
            privileged: true
          resources:
            limits:
              memory: "128Mi"
              cpu: "500m"
          ports:
          - containerPort: 8123
            name: homeassistant
            protocol: TCP
      volumes:
        - name: data
          persistentVolumeClaim:
            claimName: homeassistant-claim