apiVersion: apps/v1
kind: StatefulSet
metadata:
  name: sabnzbd
  namespace: streaming
  labels:
    app: sabnzbd
    category: streaming
spec:
  serviceName: sabnzbd
  replicas: 1
  selector:
    matchLabels:
      app: sabnzbd
      category: streaming
  template:
    metadata:
      name: sabnzbd
      namespace: streaming
      labels:
        app: sabnzbd
        category: streaming
    spec:
      nodeName: nodebook
      containers:
        - name: sabnzbd
          image: lscr.io/linuxserver/sabnzbd:latest
          imagePullPolicy: Always
          env:
            - name: PUID
              value: "1000"
            - name: PGID
              value: "1000"
            - name: TZ
              value: "Europe/Vienna"
          ports:
            - containerPort: 8080
              name: http
          volumeMounts:
            - name: config
              mountPath: /config              
            - name: completed
              mountPath: /downloads    
            - name: downloads
              mountPath: /incomplete-downloads
      volumes:        
      - name: config
        hostPath: 
          path: /srv/sabnzbd
      - name: downloads
        hostPath:
          path: /media/streaming/downloads
      - name: completed
        hostPath:
          path: /media/streaming/completed

