---
apiVersion: apps/v1
kind: Deployment
metadata:
  name: nzbhydra2
  namespace: media
  labels:
    app: nzbhydra2
spec:
  replicas: 1
  selector:
    matchLabels:
      app: nzbhydra2
  strategy:
    type: Recreate
  template:
    metadata:
      labels:
        app: nzbhydra2
    spec:
      containers:
        - name: nzbhydra2
          image: lscr.io/linuxserver/nzbhydra2:v4.0.1-ls41
          env:
            - name: PGID
              value: "2000"
            - name: PUID
              value: "2000"
            - name: TZ
              value: Europe/Zurich
          ports:
            - name: http
              containerPort: 5076
          startupProbe:
            httpGet:
              path: /actuator/health/livenessState
              port: http
            initialDelaySeconds: 10
            failureThreshold: 30
            timeoutSeconds: 3
            periodSeconds: 3
          livenessProbe:
            httpGet:
              path: /actuator/health/livenessState
              port: http
            failureThreshold: 2
            timeoutSeconds: 3
            periodSeconds: 30
          volumeMounts:
            - name: data
              mountPath: /config
            - name: backup
              mountPath: /backup
      restartPolicy: Always
      automountServiceAccountToken: false
      volumes:
        - name: data
          persistentVolumeClaim:
            claimName: nzbhydra2-data
        - name: backup
          persistentVolumeClaim:
            claimName: nzbhydra2-backup
