Compare commits

...
Sign in to create a new pull request.

2 commits

Author SHA1 Message Date
Ishaan Jaff
c1dd8f2c93 fix job 2024-11-12 11:01:09 -08:00
Ishaan Jaff
78d7e87490 v0 migration job 2024-11-12 10:52:19 -08:00
2 changed files with 36 additions and 0 deletions

View file

@ -0,0 +1,27 @@
"""
This job runs the prisma migrations for the LiteLLM DB.
"""
apiVersion: batch/v1
kind: Job
metadata:
name: {{ include "litellm.fullname" . }}-migrations
annotations:
"helm.sh/hook": pre-install,pre-upgrade
"helm.sh/hook-weight": "0"
spec:
template:
spec:
containers:
- name: prisma-migrations
image: "ghcr.io/berriai/litellm:main-stable"
command: ["python", "/litellm/proxy/prisma_migration.py"]
env:
- name: DATABASE_URL
valueFrom:
secretKeyRef:
name: {{ .Values.db.secret.name }}
key: url
- name: DISABLE_SCHEMA_UPDATE
value: "{{ .Values.migrationJob.disableSchemaUpdate }}"
restartPolicy: OnFailure
backoffLimit: {{ .Values.migrationJob.backoffLimit }}

View file

@ -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.