---
apiVersion: apps/v1
kind: Deployment
metadata:
  name: zigbee2mqtt
  labels:
    app: zigbee2mqtt
spec:
  replicas: 1
  selector:
    matchLabels:
      app: zigbee2mqtt
  template:
    metadata:
      labels:
        app: zigbee2mqtt
    spec:
      containers:
        - name: zigbee2mqtt
          image: koenkk/zigbee2mqtt:latest
          imagePullPolicy: Always
          securityContext:
            privileged: true
          volumeMounts:
            - name: ttyacm
              mountPath: /dev/ttyACM0
            - name: zigbee2mqtt-data
              mountPath: /app/data
            - name: localtime
              mountPath: /etc/localtime
              readOnly: true
      volumes:
        - name: ttyacm
          hostPath:
            path: /dev/ttyACM0
        - name: zigbee2mqtt-data
          hostPath:
            path: /home/felix/zigbee2mqtt
        - name: localtime
          hostPath:
            path: /etc/localtime
