apiVersion: apps/v1
kind: Deployment
metadata:
  name: prowlarr-app
  namespace: prowlarr
  labels:
    app.kubernetes.io/name: prowlarr
    app.kubernetes.io/instance: prowlarr
spec:
  selector:
    matchLabels:
      app.kubernetes.io/name: prowlarr
  replicas: 1
  strategy:
    type: Recreate
  template:
    metadata:
      labels:
        app.kubernetes.io/name: prowlarr
    spec:
      hostNetwork: true
      dnsPolicy: ClusterFirstWithHostNet
      containers:
        - name: prowlarr-app
          image: linuxserver/prowlarr:0.1.8-develop
          imagePullPolicy: Always
          livenessProbe:
            httpGet:
              path: /
              port: 9696
            failureThreshold: 5
            initialDelaySeconds: 60
            periodSeconds: 10
            timeoutSeconds: 10
          readinessProbe:
            httpGet:
              path: /
              port: 9696
            failureThreshold: 5
            initialDelaySeconds: 60
            periodSeconds: 10
            timeoutSeconds: 10
          ports:
            - containerPort: 9696
              hostPort: 9696
          envFrom:
            - configMapRef:
                name: prowlarr-envs
          volumeMounts:
            - mountPath: /config
              name: config-volume
      volumes:
        - name: config-volume
          hostPath:
            # Ensure the file directory is created.
            path: /mnt/ssd/containers/config/prowlarr
            type: DirectoryOrCreate