From 2c34d785344e725cc5af6b88e4491a8269031f2e Mon Sep 17 00:00:00 2001 From: sync-test Date: Tue, 21 Jul 2026 06:40:18 +0530 Subject: [PATCH] fix(litellm): restore DATABASE_URL env var lost when adopting the drifted live deployment MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit kubectl apply replaced the live pod's env list wholesale with what was in this file (which never had DATABASE_URL, despite the litellm-db-credentials secret already existing) — litellm's proxy requires DB connectivity to fully start regardless of config.yaml content, so this caused an immediate crash loop. Restored it. --- apps/litellm/base/deployment.yaml | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/apps/litellm/base/deployment.yaml b/apps/litellm/base/deployment.yaml index e0c69d4..b3bd832 100644 --- a/apps/litellm/base/deployment.yaml +++ b/apps/litellm/base/deployment.yaml @@ -42,6 +42,19 @@ spec: key: LITELLM_MASTER_KEY - name: LITELLM_LOG_LEVEL value: "DEBUG" + # Present on the live (drifted) deployment but missing from this + # file — LiteLLM's proxy tries to reach Postgres for spend + # tracking/virtual-key storage regardless of whether + # general_settings.database_url is set in config.yaml, and + # fails startup entirely if DATABASE_URL is unset (discovered + # when adopting this file caused a crash loop: the litellm-db- + # credentials secret already existed, this file just never + # referenced it). + - name: DATABASE_URL + valueFrom: + secretKeyRef: + name: litellm-db-credentials + key: DATABASE_URL volumeMounts: - name: config mountPath: /app/config.yaml