From 7e91262257fc273c91c7ae1e2931ba4fbc64a5c8 Mon Sep 17 00:00:00 2001 From: rock Date: Mon, 14 Sep 2026 23:58:41 +0900 Subject: [PATCH] fix(paperless-ai): write token to /tmp as fallback (PVC mount perms) --- k8s/apps/paperless/paperless-ai.yaml | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/k8s/apps/paperless/paperless-ai.yaml b/k8s/apps/paperless/paperless-ai.yaml index 2cc7941..43d4c2a 100644 --- a/k8s/apps/paperless/paperless-ai.yaml +++ b/k8s/apps/paperless/paperless-ai.yaml @@ -28,6 +28,9 @@ spec: initContainers: - name: fetch-llm-token image: curlimages/curl:8.12.0 + securityContext: + runAsUser: 0 + fsGroup: 0 command: - sh - -c @@ -52,9 +55,13 @@ spec: fi # Store token in file for main container to read - mkdir -p /app/data - echo "$TOKEN" > /app/data/llm_token.txt - echo "[init] Token fetched and stored successfully" + # Write to both locations for compatibility + mkdir -p /tmp/llm-token /app/data 2>/dev/null || true + echo "$TOKEN" | tee /tmp/llm-token/llm_token.txt > /dev/null 2>&1 + echo "$TOKEN" > /app/data/llm_token.txt 2>/dev/null || true + echo "[init] Token fetched and stored" + [ -f /tmp/llm-token/llm_token.txt ] && echo " -> /tmp/llm-token/llm_token.txt" + [ -f /app/data/llm_token.txt ] && echo " -> /app/data/llm_token.txt" env: - name: LLM_AUTH_CLIENT_SECRET valueFrom: