---
apiVersion: apps/v1
kind: Deployment
metadata:
  name: sonarr
  namespace: sonarr
  labels:
    app: sonarr
spec:
  replicas: 1
  selector:
    matchLabels:
      app: sonarr
  template:
    metadata:
      labels:
        app: sonarr
    spec:
      containers:
        - name: sonarr
          image: linuxserver/sonarr
          imagePullPolicy: Always
          env:
            - name: PGID
              value: "117"
            - name: PUID
              value: "113"
          ports:
            - containerPort: 8989
          resources:
            limits:
              cpu: "500m"
              memory: "512Mi"
          volumeMounts:
            - mountPath: /config
              name: config
            - mountPath: /scripts
              name: scripts
            - mountPath: /downloads
              name: downloads
            - mountPath: /blackhole
              name: blackhole
            - mountPath: /media/red_one/TV Shows
              name: tv-shows
            - mountPath: /red/downloads
              name: downloads
      volumes:
        - name: config
          hostPath:
            type: Directory
            path: /home/docker/sonarr/config
        - name: scripts
          hostPath:
            type: Directory
            path: /home/docker/sonarr/scripts
        - name: downloads
          hostPath:
            type: Directory
            path: /red/downloads
        - name: blackhole
          hostPath:
            type: Directory
            path: /red/blackhole
        - name: tv-shows
          hostPath:
            type: Directory
            path: /red/TV Shows
