apiVersion: apps/v1
kind: Deployment
metadata:
  name: ephemera
  labels:
    app.kubernetes.io/controller: main
    app.kubernetes.io/instance: ephemera
    app.kubernetes.io/managed-by: Helm
    app.kubernetes.io/name: ephemera
    helm.sh/chart: ephemera-4.6.2
  namespace: ephemera
spec:
  revisionHistoryLimit: 3
  replicas: 1
  strategy:
    type: Recreate
  selector:
    matchLabels:
      app.kubernetes.io/controller: main
      app.kubernetes.io/name: ephemera
      app.kubernetes.io/instance: ephemera
  template:
    metadata:
      labels:
        app.kubernetes.io/controller: main
        app.kubernetes.io/instance: ephemera
        app.kubernetes.io/name: ephemera
    spec:
      enableServiceLinks: false
      serviceAccountName: default
      automountServiceAccountToken: true
      hostIPC: false
      hostNetwork: false
      hostPID: false
      dnsPolicy: ClusterFirst
      containers:
        - env:
            - name: TZ
              value: US/Central
            - name: APPRISE_STORAGE_MODE
              value: memory
            - name: APPRISE_STATEFUL_MODE
              value: disabled
            - name: APPRISE_WORKER_COUNT
              value: "1"
            - name: APPRISE_STATELESS_URLS
              valueFrom:
                secretKeyRef:
                  key: ntfy-url
                  name: ephemera-apprise-config
          image: caronc/apprise:1.3.0
          imagePullPolicy: IfNotPresent
          name: apprise-api
          resources:
            requests:
              cpu: 10m
              memory: 128Mi
        - env:
            - name: LOG_LEVEL
              value: info
            - name: LOG_HTML
              value: "false"
            - name: CAPTCHA_SOLVER
              value: none
            - name: TZ
              value: America/Chicago
          image: ghcr.io/flaresolverr/flaresolverr:v3.4.6
          imagePullPolicy: IfNotPresent
          name: flaresolverr
          resources:
            requests:
              cpu: 10m
              memory: 128Mi
        - env:
            - name: ALLOWED_ORIGINS
              value: https://ephemera.alexlebens.net
            - name: BASE_URL
              value: https://ephemera.alexlebens.net
            - name: AA_BASE_URL
              value: https://annas-archive.org
            - name: FLARESOLVERR_URL
              value: http://127.0.0.1:8191
            - name: LG_BASE_URL
              value: https://gen.com
            - name: PUID
              value: "0"
            - name: PGID
              value: "0"
          image: ghcr.io/orwellianepilogue/ephemera:2.0.0
          imagePullPolicy: IfNotPresent
          name: main
          resources:
            requests:
              cpu: 50m
              memory: 128Mi
          volumeMounts:
            - mountPath: /app/downloads
              name: cache
            - mountPath: /app/data
              name: config
            - mountPath: /app/ingest
              name: ingest
      volumes:
        - emptyDir: {}
          name: cache
        - name: config
          persistentVolumeClaim:
            claimName: ephemera
        - name: ingest
          persistentVolumeClaim:
            claimName: ephemera-import-nfs-storage
