apiVersion: apps/v1
kind: Deployment
metadata:
  name: unpackerr
  labels:
    app: unpackerr
  annotations:
    keel.sh/policy: "force"
    keel.sh/match-tag: "true"
    keel.sh/trigger: "poll"
    keel.sh/pollSchedule: "@daily"
spec:
  replicas: 1
  revisionHistoryLimit: 0
  strategy:
    type: Recreate
  selector:
    matchLabels:
      app: unpackerr
  template:
    metadata:
      labels:
        app: unpackerr
    spec:
      containers:
        - name: unpackerr
          image: golift/unpackerr:latest
          env:
            - name: PUID
              value: "1000"
            - name: PGID
              value: "1000"
            - name: TZ
              value: "Europe/Warsaw"
            - name: UN_SONARR_0_URL
              value: "http://sonarr:8989"
            - name: UN_SONARR_0_API_KEY
              valueFrom:
                secretKeyRef:
                  name: unpackerr-secret
                  key: UN_SONARR_0_API_KEY
            - name: UN_RADARR_0_URL
              value: "http://radarr:7878"
            - name: UN_RADARR_0_API_KEY
              valueFrom:
                secretKeyRef:
                  name: unpackerr-secret
                  key: UN_RADARR_0_API_KEY
          volumeMounts:
            - mountPath: /downloads
              name: downloads-volume
      volumes:
        - name: downloads-volume
          hostPath:
            path: /mnt/downloads
