mirror of
https://github.com/BerriAI/litellm.git
synced 2025-04-26 03:04:13 +00:00
feat: add extraEnvVars to the helm deployment (#9292)
This commit is contained in:
parent
0415f1205e
commit
c4ea1ab61b
4 changed files with 46 additions and 2 deletions
|
@ -18,7 +18,7 @@ type: application
|
||||||
# This is the chart version. This version number should be incremented each time you make changes
|
# This is the chart version. This version number should be incremented each time you make changes
|
||||||
# to the chart and its templates, including the app version.
|
# to the chart and its templates, including the app version.
|
||||||
# Versions are expected to follow Semantic Versioning (https://semver.org/)
|
# Versions are expected to follow Semantic Versioning (https://semver.org/)
|
||||||
version: 0.4.2
|
version: 0.4.3
|
||||||
|
|
||||||
# This is the version number of the application being deployed. This version number should be
|
# This is the version number of the application being deployed. This version number should be
|
||||||
# incremented each time you make changes to the application. Versions are not expected to
|
# incremented each time you make changes to the application. Versions are not expected to
|
||||||
|
|
|
@ -97,6 +97,9 @@ spec:
|
||||||
value: {{ $val | quote }}
|
value: {{ $val | quote }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
{{- with .Values.extraEnvVars }}
|
||||||
|
{{- toYaml . | nindent 12 }}
|
||||||
|
{{- end }}
|
||||||
envFrom:
|
envFrom:
|
||||||
{{- range .Values.environmentSecrets }}
|
{{- range .Values.environmentSecrets }}
|
||||||
- secretRef:
|
- secretRef:
|
||||||
|
|
|
@ -80,3 +80,38 @@ tests:
|
||||||
secretKeyRef:
|
secretKeyRef:
|
||||||
name: my-secret
|
name: my-secret
|
||||||
key: my-key
|
key: my-key
|
||||||
|
- it: should work with extraEnvVars
|
||||||
|
template: deployment.yaml
|
||||||
|
set:
|
||||||
|
extraEnvVars:
|
||||||
|
- name: EXTRA_ENV_VAR
|
||||||
|
valueFrom:
|
||||||
|
fieldRef:
|
||||||
|
fieldPath: metadata.labels['env']
|
||||||
|
asserts:
|
||||||
|
- contains:
|
||||||
|
path: spec.template.spec.containers[0].env
|
||||||
|
content:
|
||||||
|
name: EXTRA_ENV_VAR
|
||||||
|
valueFrom:
|
||||||
|
fieldRef:
|
||||||
|
fieldPath: metadata.labels['env']
|
||||||
|
- it: should work with both extraEnvVars and envVars
|
||||||
|
template: deployment.yaml
|
||||||
|
set:
|
||||||
|
envVars:
|
||||||
|
ENV_VAR: ENV_VAR_VALUE
|
||||||
|
extraEnvVars:
|
||||||
|
- name: EXTRA_ENV_VAR
|
||||||
|
value: EXTRA_ENV_VAR_VALUE
|
||||||
|
asserts:
|
||||||
|
- contains:
|
||||||
|
path: spec.template.spec.containers[0].env
|
||||||
|
content:
|
||||||
|
name: ENV_VAR
|
||||||
|
value: ENV_VAR_VALUE
|
||||||
|
- contains:
|
||||||
|
path: spec.template.spec.containers[0].env
|
||||||
|
content:
|
||||||
|
name: EXTRA_ENV_VAR
|
||||||
|
value: EXTRA_ENV_VAR_VALUE
|
||||||
|
|
|
@ -195,9 +195,15 @@ migrationJob:
|
||||||
annotations: {}
|
annotations: {}
|
||||||
ttlSecondsAfterFinished: 120
|
ttlSecondsAfterFinished: 120
|
||||||
|
|
||||||
# Additional environment variables to be added to the deployment
|
# Additional environment variables to be added to the deployment as a map of key-value pairs
|
||||||
envVars: {
|
envVars: {
|
||||||
# USE_DDTRACE: "true"
|
# USE_DDTRACE: "true"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# Additional environment variables to be added to the deployment as a list of k8s env vars
|
||||||
|
extraEnvVars: {
|
||||||
|
# - name: EXTRA_ENV_VAR
|
||||||
|
# value: EXTRA_ENV_VAR_VALUE
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue