This commit is contained in:
tsushanth 2026-09-08 06:38:57 -07:00 committed by GitHub
commit 4d9bd31261
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 64 additions and 0 deletions

View file

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

View file

@ -223,6 +223,61 @@ tests:
name: init-tpl
image: "ghcr.io/berriai/litellm: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: