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