forked from BerriAI/litellm
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
(helm) - allow specifying envVars on values.yaml + add helm lint test (…
…BerriAI#7789) * litellm use envVars values.yaml * fix values.yaml * add helm lint to ci/cd pipeline * working values.yaml * add helm tests to ci/cd * fix helm chart testing * update helm tests * fix helm test * fix use test values in ci * fix busy box testing on helm * fix test-values.yaml * update helm tests * fix test connection
- Loading branch information
1 parent
7b45349
commit 4081aeb
Showing
6 changed files
with
154 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
fullnameOverride: "" | ||
# Disable database deployment and configuration | ||
db: | ||
deployStandalone: false | ||
useExisting: false | ||
|
||
# Test environment variables | ||
envVars: | ||
DD_ENV: "dev_helm" | ||
DD_SERVICE: "litellm" | ||
USE_DDTRACE: "true" | ||
|
||
# Disable migration job since we're not using a database | ||
migrationJob: | ||
enabled: false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
43 changes: 43 additions & 0 deletions
43
deploy/charts/litellm-helm/templates/tests/test-env-vars.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
apiVersion: v1 | ||
kind: Pod | ||
metadata: | ||
name: "{{ include "litellm.fullname" . }}-env-test" | ||
labels: | ||
{{- include "litellm.labels" . | nindent 4 }} | ||
annotations: | ||
"helm.sh/hook": test | ||
spec: | ||
containers: | ||
- name: test | ||
image: busybox | ||
command: ['sh', '-c'] | ||
args: | ||
- | | ||
# Test DD_ENV | ||
if [ "$DD_ENV" != "dev_helm" ]; then | ||
echo "❌ Environment variable DD_ENV mismatch. Expected: dev_helm, Got: $DD_ENV" | ||
exit 1 | ||
fi | ||
echo "✅ Environment variable DD_ENV matches expected value: $DD_ENV" | ||
# Test DD_SERVICE | ||
if [ "$DD_SERVICE" != "litellm" ]; then | ||
echo "❌ Environment variable DD_SERVICE mismatch. Expected: litellm, Got: $DD_SERVICE" | ||
exit 1 | ||
fi | ||
echo "✅ Environment variable DD_SERVICE matches expected value: $DD_SERVICE" | ||
# Test USE_DDTRACE | ||
if [ "$USE_DDTRACE" != "true" ]; then | ||
echo "❌ Environment variable USE_DDTRACE mismatch. Expected: true, Got: $USE_DDTRACE" | ||
exit 1 | ||
fi | ||
echo "✅ Environment variable USE_DDTRACE matches expected value: $USE_DDTRACE" | ||
env: | ||
- name: DD_ENV | ||
value: {{ .Values.envVars.DD_ENV | quote }} | ||
- name: DD_SERVICE | ||
value: {{ .Values.envVars.DD_SERVICE | quote }} | ||
- name: USE_DDTRACE | ||
value: {{ .Values.envVars.USE_DDTRACE | quote }} | ||
restartPolicy: Never |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters