mirror of
https://github.com/BerriAI/litellm.git
synced 2026-09-29 01:42:19 +00:00
fix(helm): gate the DD_* env-vars test on those values being set
templates/tests/test-env-vars.yaml is a helm.sh/hook: test pod that
asserts DD_ENV == dev_helm, DD_SERVICE == litellm and
USE_DDTRACE == true, reading them from .Values.envVars. Those values
are only set in ci/test-values.yaml, which the chart's own CircleCI
job uses. values.yaml defaults envVars to {}, so on every real
install that doesn't set the Datadog env vars, `helm test <release>`
fails with "Environment variable DD_ENV mismatch. Expected: dev_helm,
Got: ", and since helm stops at the first failed test, it also masks
the useful test-connection test.
Render the pod only when all three values are actually set. CI
behavior is unchanged since ci/test-values.yaml sets them.
This commit is contained in:
parent
e0e249225b
commit
558ad86c1f
1 changed files with 4 additions and 1 deletions
|
|
@ -1,3 +1,5 @@
|
|||
{{- $envVars := .Values.envVars | default dict }}
|
||||
{{- if and $envVars.DD_ENV $envVars.DD_SERVICE $envVars.USE_DDTRACE }}
|
||||
apiVersion: v1
|
||||
kind: Pod
|
||||
metadata:
|
||||
|
|
@ -40,4 +42,5 @@ spec:
|
|||
value: {{ .Values.envVars.DD_SERVICE | quote }}
|
||||
- name: USE_DDTRACE
|
||||
value: {{ .Values.envVars.USE_DDTRACE | quote }}
|
||||
restartPolicy: Never
|
||||
restartPolicy: Never
|
||||
{{- end -}}
|
||||
Loading…
Add table
Reference in a new issue