Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions helm/litellm-helm/templates/migrations-job.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,15 @@ spec:
{{- end }}
- name: DISABLE_SCHEMA_UPDATE
value: "false" # always run the migration from the Helm PreSync hook, override the value set
envFrom:
{{- range .Values.environmentSecrets }}
- secretRef:
name: {{ . }}
{{- end }}
{{- range .Values.environmentConfigMaps }}
- configMapRef:
name: {{ . }}
{{- end }}
{{- with .Values.volumeMounts }}
volumeMounts:
{{- toYaml . | nindent 12 }}
Expand Down
55 changes: 55 additions & 0 deletions helm/litellm-helm/tests/migrations-job_tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -223,6 +223,61 @@ tests:
name: init-tpl
image: "ghcr.io/berriai/litellm-database:test"
command: ["echo", "hello"]
- it: should work with environmentSecrets
template: migrations-job.yaml
set:
migrationJob:
enabled: true
environmentSecrets:
- litellm-env-secret
- litellm-extra-secret
asserts:
- contains:
path: spec.template.spec.containers[0].envFrom
content:
secretRef:
name: litellm-env-secret
- contains:
path: spec.template.spec.containers[0].envFrom
content:
secretRef:
name: litellm-extra-secret

- it: should work with environmentConfigMaps
template: migrations-job.yaml
set:
migrationJob:
enabled: true
environmentConfigMaps:
- litellm-env-configmap
asserts:
- contains:
path: spec.template.spec.containers[0].envFrom
content:
configMapRef:
name: litellm-env-configmap

- it: should work with both environmentSecrets and environmentConfigMaps
template: migrations-job.yaml
set:
migrationJob:
enabled: true
environmentSecrets:
- litellm-env-secret
environmentConfigMaps:
- litellm-env-configmap
asserts:
- contains:
path: spec.template.spec.containers[0].envFrom
content:
secretRef:
name: litellm-env-secret
- contains:
path: spec.template.spec.containers[0].envFrom
content:
configMapRef:
name: litellm-env-configmap

- it: should work with extraContainers
template: migrations-job.yaml
set:
Expand Down
Loading