diff --git a/deploy/charts/litellm-helm/Chart.yaml b/deploy/charts/litellm-helm/Chart.yaml index 4d856fdc0f..5de591fd73 100644 --- a/deploy/charts/litellm-helm/Chart.yaml +++ b/deploy/charts/litellm-helm/Chart.yaml @@ -18,7 +18,7 @@ type: application # 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. # 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 # incremented each time you make changes to the application. Versions are not expected to diff --git a/deploy/charts/litellm-helm/templates/deployment.yaml b/deploy/charts/litellm-helm/templates/deployment.yaml index 52f761ed15..5b9488c19b 100644 --- a/deploy/charts/litellm-helm/templates/deployment.yaml +++ b/deploy/charts/litellm-helm/templates/deployment.yaml @@ -97,6 +97,9 @@ spec: value: {{ $val | quote }} {{- end }} {{- end }} + {{- with .Values.extraEnvVars }} + {{- toYaml . | nindent 12 }} + {{- end }} envFrom: {{- range .Values.environmentSecrets }} - secretRef: diff --git a/deploy/charts/litellm-helm/tests/deployment_tests.yaml b/deploy/charts/litellm-helm/tests/deployment_tests.yaml index 0e4b8e0b1f..b71f91377f 100644 --- a/deploy/charts/litellm-helm/tests/deployment_tests.yaml +++ b/deploy/charts/litellm-helm/tests/deployment_tests.yaml @@ -80,3 +80,38 @@ tests: secretKeyRef: name: my-secret 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 diff --git a/deploy/charts/litellm-helm/values.yaml b/deploy/charts/litellm-helm/values.yaml index 70f6c2ef23..0440e28eed 100644 --- a/deploy/charts/litellm-helm/values.yaml +++ b/deploy/charts/litellm-helm/values.yaml @@ -195,9 +195,15 @@ migrationJob: annotations: {} 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: { # 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 +} +