From 4dc23cf997338fa57d2177b3196ec6db712cc95f Mon Sep 17 00:00:00 2001 From: Ishaan Jaff Date: Wed, 13 Nov 2024 16:43:26 -0800 Subject: [PATCH] use existing spec for migrations job --- deploy/charts/litellm-helm/templates/migrations-job.yaml | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/deploy/charts/litellm-helm/templates/migrations-job.yaml b/deploy/charts/litellm-helm/templates/migrations-job.yaml index d998592e2..06d45d5fc 100644 --- a/deploy/charts/litellm-helm/templates/migrations-job.yaml +++ b/deploy/charts/litellm-helm/templates/migrations-job.yaml @@ -17,11 +17,12 @@ spec: command: ["python", "litellm/proxy/prisma_migration.py"] workingDir: "/app" env: + {{- if .Values.db.deployStandalone }} - name: DATABASE_URL - valueFrom: - secretKeyRef: - name: db-secret - key: DATABASE_URL + value: postgresql://{{ .Values.postgresql.auth.username }}:{{ .Values.postgresql.auth.password }}@{{ .Release.Name }}-postgresql/{{ .Values.postgresql.auth.database }} + {{- else if .Values.db.useExisting }} + - name: DATABASE_URL + value: {{ .Values.db.url | quote }} - name: DISABLE_SCHEMA_UPDATE value: "false" # always run the migration from the Helm PreSync hook, override the value set restartPolicy: OnFailure