feat(paperless): add paperless-ai with local LLM for auto-tagging
- paperless-ai deployment using clusterzx/paperless-ai - LLM via local api-gateway (reasoning model, no auth - phase 3 pending) - Paperless API token SOPS-encrypted - Auto-tags new documents, 5min scan interval - Adds 'ai-processed' tag to classified documents
This commit is contained in:
@@ -11,6 +11,7 @@ resources:
|
||||
- backup-cronjob.yaml
|
||||
- adapter-configmap.yaml
|
||||
- rbac.yaml
|
||||
- paperless-ai.yaml
|
||||
# postgres: paperless-db CNPG Cluster, deployed by k8s/infra/databases (wave 2,
|
||||
# before this app at wave 8) - not duplicated here. Same for the paperless-oidc
|
||||
# and paperless-minio-creds Secrets, written by PostSync provisioning Jobs in
|
||||
|
||||
@@ -0,0 +1,62 @@
|
||||
# Secret paperless-ai-config managed via SOPS (argocd/secrets/paperless-ai-secrets.enc.yaml)
|
||||
---
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: paperless-ai
|
||||
namespace: paperless
|
||||
labels:
|
||||
app.kubernetes.io/name: paperless-ai
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
app.kubernetes.io/name: paperless-ai
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app.kubernetes.io/name: paperless-ai
|
||||
spec:
|
||||
tolerations:
|
||||
- key: node-role.kubernetes.io/control-plane
|
||||
operator: Exists
|
||||
effect: NoSchedule
|
||||
containers:
|
||||
- name: paperless-ai
|
||||
image: clusterzx/paperless-ai:latest
|
||||
env:
|
||||
# Paperless-ngx connection
|
||||
- name: PAPERLESS_API_URL
|
||||
value: "http://paperless.paperless.svc.cluster.local:8000"
|
||||
- name: PAPERLESS_API_TOKEN
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: paperless-ai-config
|
||||
key: PAPERLESS_API_TOKEN
|
||||
# LLM API — local gateway, no auth required (phase 3 not built yet)
|
||||
- name: AI_PROVIDER
|
||||
value: "custom"
|
||||
- name: CUSTOM_BASE_URL
|
||||
value: "http://api-gateway.api.svc.cluster.local:8080/v1"
|
||||
- name: CUSTOM_API_KEY
|
||||
value: "not-required"
|
||||
- name: CUSTOM_MODEL
|
||||
value: "reasoning"
|
||||
# Behavior
|
||||
- name: SCAN_INTERVAL
|
||||
value: "300"
|
||||
- name: PROCESS_PREDEFINED_DOCUMENTS
|
||||
value: "no"
|
||||
- name: ADD_AI_TAG
|
||||
value: "yes"
|
||||
- name: AI_TAG_NAME
|
||||
value: "ai-processed"
|
||||
- name: USE_PROMPT_TAGS
|
||||
value: "yes"
|
||||
resources:
|
||||
requests:
|
||||
cpu: 50m
|
||||
memory: 128Mi
|
||||
limits:
|
||||
cpu: 500m
|
||||
memory: 512Mi
|
||||
Reference in New Issue
Block a user