fix(paperless-ai): write token to /tmp as fallback (PVC mount perms)
This commit is contained in:
@@ -28,6 +28,9 @@ spec:
|
|||||||
initContainers:
|
initContainers:
|
||||||
- name: fetch-llm-token
|
- name: fetch-llm-token
|
||||||
image: curlimages/curl:8.12.0
|
image: curlimages/curl:8.12.0
|
||||||
|
securityContext:
|
||||||
|
runAsUser: 0
|
||||||
|
fsGroup: 0
|
||||||
command:
|
command:
|
||||||
- sh
|
- sh
|
||||||
- -c
|
- -c
|
||||||
@@ -52,9 +55,13 @@ spec:
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# Store token in file for main container to read
|
# Store token in file for main container to read
|
||||||
mkdir -p /app/data
|
# Write to both locations for compatibility
|
||||||
echo "$TOKEN" > /app/data/llm_token.txt
|
mkdir -p /tmp/llm-token /app/data 2>/dev/null || true
|
||||||
echo "[init] Token fetched and stored successfully"
|
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:
|
env:
|
||||||
- name: LLM_AUTH_CLIENT_SECRET
|
- name: LLM_AUTH_CLIENT_SECRET
|
||||||
valueFrom:
|
valueFrom:
|
||||||
|
|||||||
Reference in New Issue
Block a user