apiVersion: apps/v1
kind: Deployment
metadata:
  name: radarr
  labels:
    app.kubernetes.io/name: radarr
spec:
  replicas: 1
  selector:
    matchLabels:
      app.kubernetes.io/name: radarr
  template:
    metadata:
      labels:
        app.kubernetes.io/name: radarr
    spec:
      containers:
        - name: radarr
          image: linuxserver/radarr:latest
          imagePullPolicy: Always
          ports:
            - name: "http"
              containerPort: 7878
              protocol: TCP
          volumeMounts:
            - name: radarr-config
              mountPath: /config
            - name: data
              mountPath: /data
            - name: mediaserver
              mountPath: /mediaserver
          envFrom:
            - configMapRef:
                name: mediaserver-permissions
          resources:
            requests:
              cpu: "250m"
              memory: "250Mi"
            limits:
              cpu: "500m"
              memory: "500Mi"
          readinessProbe:
            httpGet:
              path: /
              port: http
              scheme: HTTP
            periodSeconds: 10
            failureThreshold: 3
          livenessProbe:
            httpGet:
              path: /
              port: http
              scheme: HTTP
            initialDelaySeconds: 60
            periodSeconds: 10
            failureThreshold: 5
      volumes:
        - name: radarr-config
          persistentVolumeClaim:
            claimName: radarr-config
        - name: data
          emptyDir: {}
        - name: mediaserver
          persistentVolumeClaim:
            claimName: mediaserver
