mirror of
https://github.com/BerriAI/litellm.git
synced 2026-11-15 09:12:18 +00:00
feat(deploy): add a Rust forwarding toggle to the single-deployment chart
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
a948afa682
commit
7a3612ed56
3 changed files with 60 additions and 0 deletions
|
|
@ -311,6 +311,10 @@ and the same spend transaction buffer.
|
|||
- name: LITELLM_LOG
|
||||
value: {{ .Values.logLevel | quote }}
|
||||
{{- end }}
|
||||
{{- if and (not (kindIs "invalid" .Values.rustGateway.enabled)) (not (hasKey (default dict .Values.envVars) "LITELLM_RUST_GATEWAY")) }}
|
||||
- name: LITELLM_RUST_GATEWAY
|
||||
value: {{ .Values.rustGateway.enabled | toString | quote }}
|
||||
{{- end }}
|
||||
{{- if .Values.envVars }}
|
||||
{{- range $key, $val := .Values.envVars }}
|
||||
- name: {{ $key }}
|
||||
|
|
|
|||
52
helm/litellm-helm/tests/rust_gateway_tests.yaml
Normal file
52
helm/litellm-helm/tests/rust_gateway_tests.yaml
Normal file
|
|
@ -0,0 +1,52 @@
|
|||
suite: Rust forwarding gateway
|
||||
templates:
|
||||
- deployment.yaml
|
||||
- configmap-litellm.yaml
|
||||
tests:
|
||||
- it: leaves the image default in place when unset
|
||||
template: deployment.yaml
|
||||
asserts:
|
||||
- notContains:
|
||||
path: spec.template.spec.containers[0].env
|
||||
content:
|
||||
name: LITELLM_RUST_GATEWAY
|
||||
any: true
|
||||
- it: turns forwarding off explicitly
|
||||
template: deployment.yaml
|
||||
set:
|
||||
rustGateway.enabled: false
|
||||
asserts:
|
||||
- contains:
|
||||
path: spec.template.spec.containers[0].env
|
||||
content:
|
||||
name: LITELLM_RUST_GATEWAY
|
||||
value: "false"
|
||||
- it: enables forwarding without changing command or probes
|
||||
template: deployment.yaml
|
||||
set:
|
||||
rustGateway.enabled: true
|
||||
asserts:
|
||||
- contains:
|
||||
path: spec.template.spec.containers[0].env
|
||||
content:
|
||||
name: LITELLM_RUST_GATEWAY
|
||||
value: "true"
|
||||
- equal:
|
||||
path: spec.template.spec.containers[0].livenessProbe.httpGet.port
|
||||
value: http
|
||||
- it: respects an explicit environment override
|
||||
template: deployment.yaml
|
||||
set:
|
||||
rustGateway.enabled: true
|
||||
envVars.LITELLM_RUST_GATEWAY: "false"
|
||||
asserts:
|
||||
- contains:
|
||||
path: spec.template.spec.containers[0].env
|
||||
content:
|
||||
name: LITELLM_RUST_GATEWAY
|
||||
value: "false"
|
||||
- notContains:
|
||||
path: spec.template.spec.containers[0].env
|
||||
content:
|
||||
name: LITELLM_RUST_GATEWAY
|
||||
value: "true"
|
||||
|
|
@ -3,6 +3,10 @@
|
|||
# Declare variables to be passed into your templates.
|
||||
|
||||
replicaCount: 1
|
||||
|
||||
rustGateway:
|
||||
# null inherits the image default; true or false sets LITELLM_RUST_GATEWAY
|
||||
enabled:
|
||||
liteadmin:
|
||||
enabled: false
|
||||
existingSecret: ""
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue