From c1dd8f2c93c513cd7855304f144743105c1ad920 Mon Sep 17 00:00:00 2001 From: Ishaan Jaff Date: Tue, 12 Nov 2024 11:01:09 -0800 Subject: [PATCH] fix job --- .../litellm-helm/templates/migrations-job.yaml | 12 ++++++------ deploy/charts/litellm-helm/values.yaml | 9 +++++++++ 2 files changed, 15 insertions(+), 6 deletions(-) diff --git a/deploy/charts/litellm-helm/templates/migrations-job.yaml b/deploy/charts/litellm-helm/templates/migrations-job.yaml index 64aa9d3c5..7f2cc0aeb 100644 --- a/deploy/charts/litellm-helm/templates/migrations-job.yaml +++ b/deploy/charts/litellm-helm/templates/migrations-job.yaml @@ -13,15 +13,15 @@ spec: spec: containers: - name: prisma-migrations - image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}" - command: ["python", "/path/to/prisma_migration.py"] + image: "ghcr.io/berriai/litellm:main-stable" + command: ["python", "/litellm/proxy/prisma_migration.py"] env: - name: DATABASE_URL valueFrom: secretKeyRef: - name: {{ .Values.secrets.databaseSecret }} - key: database_url + name: {{ .Values.db.secret.name }} + key: url - name: DISABLE_SCHEMA_UPDATE - value: "False" # Toggle this for environments like review labs + value: "{{ .Values.migrationJob.disableSchemaUpdate }}" restartPolicy: OnFailure - backoffLimit: 3 + backoffLimit: {{ .Values.migrationJob.backoffLimit }} diff --git a/deploy/charts/litellm-helm/values.yaml b/deploy/charts/litellm-helm/values.yaml index a2c55f2fa..c8e4aa1f2 100644 --- a/deploy/charts/litellm-helm/values.yaml +++ b/deploy/charts/litellm-helm/values.yaml @@ -179,3 +179,12 @@ postgresql: redis: enabled: false architecture: standalone + +# Prisma migration job settings +migrationJob: + enabled: true # Enable or disable the schema migration Job + retries: 3 # Number of retries for the Job in case of failure + backoffLimit: 4 # Backoff limit for Job restarts + disableSchemaUpdate: false # Skip schema migrations for specific environments. When True, the job will exit with code 0. + +