---

kind: Deployment
apiVersion: apps/v1
metadata:
  name: zigbee2mqtt
  namespace: zigbee2mqtt
  labels:
    app: zigbee2mqtt
spec:
  replicas: 1
  selector:
    matchLabels:
      app: zigbee2mqtt
  template:
    metadata:
      labels:
        app: zigbee2mqtt
    spec:
      volumes:
        - name: dev-usb0
          hostPath:
            path: /dev/ttyACM0
            type: ''
        - name: zigbee2mqttdata
          nfs:
            server: 10.0.0.29
            path: /export/kube-storage/zigbee2mqtt
        - name: runudev-local
          hostPath:
            path: /run/udev
            type: ''
      containers:
        - name: zigbee2mqtt
          image: 'koenkk/zigbee2mqtt'
          env:
            - name: TZ
              value: Asia/Jerusalem
          resources:
            limits:
              cpu: 200m
              memory: 100Mi
          volumeMounts:
            - name: dev-usb0
              mountPath: /dev/ttyACM0
            - name: zigbee2mqttdata
              mountPath: /app/data
            - name: runudev-local
              mountPath: /run/udev
          imagePullPolicy: IfNotPresent
          securityContext:
            privileged: true
      restartPolicy: Always
      terminationGracePeriodSeconds: 30
      dnsPolicy: ClusterFirst
      nodeName: k3s-worker-1
      securityContext: {}
      schedulerName: default-scheduler
  strategy:
    type: RollingUpdate
    rollingUpdate:
      maxUnavailable: 25%
      maxSurge: 25%
