apiVersion: apps/v1
kind: Deployment
metadata:
  name: deluge-deploy
spec:
  replicas: 1
  selector:
    matchLabels:
      app: deluge-app
  template:
    metadata:
      labels:
        app: deluge-app
        terraform: "false"
    spec:
      volumes:
      - name: data-vol
        hostPath:
          path: /home/sasha/multimedia-content/
      - name: data-vol-external1
        hostPath:
          path: /home/sasha/external-hdd1/
      - name: config-vol
        hostPath:
          path: /home/sasha/deluge-config/
      containers:
      - name: deluge-app-main-container
        image: ghcr.io/linuxserver/deluge
        imagePullPolicy: IfNotPresent
        volumeMounts:
        - name: data-vol-external1
          mountPath: /external-hdd1
        - name: data-vol
          mountPath: /downloads
        - name: config-vol
          mountPath: /config
        ports:
        - name: http
          containerPort: 8112
          protocol: TCP
        env:
        - name: TZ
          value: "Europe/Moscow"
        - name: PUID
          value: "1000"
        - name: PGID
          value: "1000"

        livenessProbe:
          tcpSocket:
            port: http
          initialDelaySeconds: 0
          failureThreshold: 3
          timeoutSeconds: 1
          periodSeconds: 10
        readinessProbe:
          tcpSocket:
            port: http
          initialDelaySeconds: 0
          failureThreshold: 3
          timeoutSeconds: 1
          periodSeconds: 10
        startupProbe:
          tcpSocket:
            port: http
          initialDelaySeconds: 0
          failureThreshold: 30
          timeoutSeconds: 1
          periodSeconds: 5
        # resources:
        #   limits:
        #     memory: "1024Mi"
        #     cpu: "500m"
