From b4f76556b6df47e2066a28be8b3e4e6310595a4b Mon Sep 17 00:00:00 2001 From: Ishaan Jaff Date: Tue, 12 Nov 2024 12:06:13 -0800 Subject: [PATCH] handle standalone DB on helm hook --- .../charts/litellm-helm/templates/migrations-job.yaml | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/deploy/charts/litellm-helm/templates/migrations-job.yaml b/deploy/charts/litellm-helm/templates/migrations-job.yaml index 5c34a8feb..ec319fe66 100644 --- a/deploy/charts/litellm-helm/templates/migrations-job.yaml +++ b/deploy/charts/litellm-helm/templates/migrations-job.yaml @@ -15,11 +15,13 @@ spec: image: "ghcr.io/berriai/litellm:main-stable" command: ["python", "/litellm/proxy/prisma_migration.py"] env: + {{- if .Values.db.deployStandalone }} - name: DATABASE_URL - valueFrom: - secretKeyRef: - name: {{ .Values.db.secret.name }} - key: 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 }} + {{- end }} - name: DISABLE_SCHEMA_UPDATE value: "{{ .Values.migrationJob.disableSchemaUpdate }}" restartPolicy: OnFailure