forked from phoenix/litellm-mirror
v0 migration job
This commit is contained in:
parent
5081b912eb
commit
78d7e87490
1 changed files with 27 additions and 0 deletions
27
deploy/charts/litellm-helm/templates/migrations-job.yaml
Normal file
27
deploy/charts/litellm-helm/templates/migrations-job.yaml
Normal 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: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
|
||||
command: ["python", "/path/to/prisma_migration.py"]
|
||||
env:
|
||||
- name: DATABASE_URL
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: {{ .Values.secrets.databaseSecret }}
|
||||
key: database_url
|
||||
- name: DISABLE_SCHEMA_UPDATE
|
||||
value: "False" # Toggle this for environments like review labs
|
||||
restartPolicy: OnFailure
|
||||
backoffLimit: 3
|
Loading…
Add table
Add a link
Reference in a new issue