apiVersion: apps/v1
kind: Deployment
metadata:
  name: unpackerr
  labels:
    app.kubernetes.io/name: unpackerr
spec:
  replicas: 1
  strategy:
    type: Recreate
  selector:
    matchLabels:
      app.kubernetes.io/name: unpackerr
  template:
    metadata:
      labels:
        app.kubernetes.io/name: unpackerr
    spec:
      containers:
        - name: unpackerr
          image: golift/unpackerr:0.9.9
          imagePullPolicy: IfNotPresent
          resources:
            requests:
              cpu: 50m
              memory: 250Mi
            limits:
              cpu: 300m
              memory: 500Mi
          volumeMounts:
            - name: unpackerr-downloads
              mountPath: /downloads
          env:
            - name: TZ
              value: ${CONFIG_TIMEZONE}
          envFrom:
            - secretRef:
                name: unpackerr-secrets
      securityContext:
        runAsUser: 1000
        runAsGroup: 1000
        fsGroup: 1000
        fsGroupChangePolicy: "OnRootMismatch"
      volumes:
        - name: unpackerr-downloads
          persistentVolumeClaim:
            claimName: shared-downloads
