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:
Yujong Lee 2026-11-03 09:07:15 +09:00
parent a948afa682
commit 7a3612ed56
3 changed files with 60 additions and 0 deletions

View file

@ -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 }}

View 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"

View file

@ -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: ""