apiVersion: apps/v1
kind: Deployment
metadata:
  name: mangareader
  namespace: stack-arr
spec:
  replicas: 1
  selector:
    matchLabels:
      app: mangareader
  template:
    metadata:
      labels:
        app: mangareader
    spec:
      securityContext:
        fsGroup: 1013
      imagePullSecrets:
      - name: regcred
      containers:
      - name: mangareader
        image: ghcr.io/suwayomi/tachidesk:v2.1.2061
        securityContext:
          capabilities:
            add:
              - NET_ADMIN
        ports:
          - containerPort: 4567
            name: webui
        env:
        - name: PUID
          value: "1013"
        - name: PGID
          value: "1013"
        - name: TZ
          value: 'Etc/UTC'
        - name: AUTO_DOWNLOAD_CHAPTERS
          value: 'true'
        - name: AUTO_BACKUP_INCLUDE_MANGA
          value: 'false'
        - name: AUTO_BACKUP_INCLUDE_CATEGORIES
          value: 'false'
        - name: AUTO_BACKUP_INCLUDE_CHAPTERS
          value: 'false'
        - name: AUTO_BACKUP_INCLUDE_TRACKING
          value: 'false'
        - name: AUTO_BACKUP_INCLUDE_HISTORY
          value: 'false'
        - name: AUTO_BACKUP_INCLUDE_CLIENT_DATA
          value: 'false'
        - name: AUTO_BACKUP_INCLUDE_SERVER_SETTINGS
          value: 'false'
        - name: FLARESOLVERR_ENABLED
          value: 'true'
        - name: FLARESOLVERR_URL
          value: 'http://flaresolverr-service.stack-arr.svc.cluster.local:8191'
        - name: DATABASE_TYPE
          value: 'POSTGRESQL'
        - name: DATABASE_URL
          value: 'postgresql://stolon-proxy-service.postgresql.svc.cluster.local:5432/mangareader'
        - name: DATABASE_USERNAME
          valueFrom:
            secretKeyRef:
              name: mangareader-secret
              key: username
        - name: DATABASE_PASSWORD
          valueFrom:
            secretKeyRef:
              name: mangareader-secret
              key: password
        volumeMounts:
        - name: config
          mountPath: /home/suwayomi/.local/share/Tachidesk
        - name: books
          mountPath: /books
        - name: downloads
          mountPath: /downloads
      volumes:
      - name: config
        persistentVolumeClaim:
          claimName: mangareader-config-pvc
      - name: books
        persistentVolumeClaim:
          claimName: mangareader-books-pvc
      - name: downloads
        persistentVolumeClaim:
          claimName: qbittorrent-downloads-pvc



