fix(helm): mount gateway config.yaml on backend Deployment - #29634
fix(helm): mount gateway config.yaml on backend Deployment#29634yassin-berriai wants to merge 2 commits into
Conversation
The componentized chart's backend Deployment never mounted
{fullname}-gateway-config or set CONFIG_FILE_PATH, so any
litellm_settings declared in gateway.config.proxy_config
(callbacks, cache, guardrails, ...) only loaded on the gateway
process — even though the backend runs the same proxy code and
needs the same callbacks to fire for management-API and
proxy-level OTel spans.
Reuse the existing gateway.config.create toggle and ConfigMap:
when true, the backend now also gets CONFIG_FILE_PATH, the
gateway-config volume + volumeMount, and a checksum/config pod
annotation so ConfigMap edits roll backend pods alongside
gateway pods. No values.yaml or new toggle is introduced; when
gateway.config.create=false the backend Deployment is byte-
identical to before.
|
|
Greptile SummaryThis PR fixes the backend Deployment in the componentized Helm chart so it mounts and reads the same
Confidence Score: 4/5The change is safe to merge; the new mount, env var, and checksum annotation are only active when the user explicitly opted in via gateway.config.create=true, and the implementation faithfully mirrors the gateway Deployment. The core logic — volume, volumeMount, env var, and checksum annotation — is correct and matches the gateway Deployment exactly. The one cosmetic discrepancy is a bare annotations: key that is now always emitted even when there is nothing to annotate, which disagrees with the PR description's byte-identical claim but causes no runtime problem. helm/litellm/templates/backend/deployment.yaml — the unconditional annotations block
|
| Filename | Overview |
|---|---|
| helm/litellm/templates/backend/deployment.yaml | Adds gateway ConfigMap mount, CONFIG_FILE_PATH env, and checksum/config annotation to backend Deployment when gateway.config.create=true; unconditionally emits an annotations: block that was previously absent when podAnnotations is empty |
Reviews (1): Last reviewed commit: "fix(helm): mount gateway config.yaml on ..." | Re-trigger Greptile
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
Guard the backend Deployment's annotations: key behind or(gateway.config.create, backend.podAnnotations) so it is suppressed entirely when neither is set, keeping output byte- identical to before this PR when gateway.config.create=false and no podAnnotations are configured.
|
Superceded by #29605. Thanks |
Summary
backendDeployment never mounted{fullname}-gateway-configor setCONFIG_FILE_PATH, so anything declared ingateway.config.proxy_config.litellm_settings(callbacks, cache, guardrails, ...) only loaded on the gateway process — even though the backend runs the same proxy code and needs the same callbacks to fire for management-API and proxy-level OTel spans.gateway.config.createtoggle and the existing ConfigMap: when true, the backend now also getsCONFIG_FILE_PATH=/app/config/config.yaml, thegateway-configvolume + volumeMount, and achecksum/configpod annotation so ConfigMap edits roll backend pods alongside gateway pods.values.yamlchange. No new toggle. Whengateway.config.create=false, the backend Deployment is byte-identical to before.Why reuse the gateway ConfigMap?
The litellm proxy reads a single
config.yaml; splitting per-component would let the two drift and break shared settings (callbacks, cache, guardrails) on whichever side forgets to set them. Reusing keeps a single source of truth and matches runtime reality.Test plan
helm templatewithgateway.config.create=trueshows the backend Deployment now containsCONFIG_FILE_PATH, thegateway-configvolumeMount + volume, and achecksum/configannotation pointing at{release}-litellm-gateway-config.helm templatewithgateway.config.create=falseproduces a backend Deployment with noCONFIG_FILE_PATH, novolumeMounts, novolumes, and nochecksum/configannotation (identical tomain).litellm-gateway-configto add a callback, confirm backend pods roll and the new callback is registered in backend logs.