litellm/deploy/charts/litellm-helm/templates
Yassin Kortam b5d3a5fc85
feat: add read-replica routing for Prisma DB via DATABASE_URL_READ_REPLICA (#27493)
- Introduce RoutingPrismaWrapper that transparently routes read operations (find_*, count, group_by, query_raw, query_first) to a reader endpoint while writes remain on the writer, enabling Aurora-style reader/writer endpoint splits
- Add IAMEndpoint dataclass and parse_iam_endpoint_from_url() to capture static connection fields from a reader URL so only the IAM token needs to rotate, avoiding the need for separate DATABASE_HOST_READ_REPLICA/etc. env vars
- Enhance PrismaWrapper with per-instance knobs (db_url_env_var, iam_endpoint, recreate_uses_datasource, log_prefix) so writer and reader wrappers are independent: the reader writes its fresh URL to DATABASE_URL_READ_REPLICA and passes datasource override to Prisma since Prisma only auto-reads DATABASE_URL
- Fix deadlock in PrismaWrapper.__getattr__: when called from inside a running event loop, schedule the token refresh as a background task instead of blocking with run_coroutine_threadsafe + future.result(), which would deadlock the loop thread waiting for a coroutine that needs the loop to run
- Fix botocore crash when DATABASE_PORT is unset by defaulting to "5432" in both proxy_cli.py and PrismaWrapper.get_rds_iam_token(); passing None caused botocore to embed the literal string "None" in the presigned URL
- Implement graceful reader degradation: reader connect/recreate failures are non-fatal; wrapper sets _reader_unavailable=True and silently routes reads to the writer to keep the proxy serving traffic during transient reader outages
- Add PrismaClient.writer_db property so the reconnect smoke-test always validates the writer engine specifically; query_raw on the routing wrapper would route to the reader and not verify the newly-recreated writer
- Expose DATABASE_URL_READ_REPLICA in Helm chart (values.yaml + deployment.yaml) via both plain value and secret key reference, and document the field in docker-compose.yml
- Add 887-line test suite covering routing logic, IAM token refresh paths, reader degradation scenarios, datasource override behavior, and the deadlock regression

Co-authored-by: Yassin Kortam <yassinkortam@g.ucla.edu>
2026-05-08 21:05:50 -07:00
..
tests Enhancement(helm): ServiceMonitor template rendering (#17038) 2025-11-24 20:53:02 -08:00
_helpers.tpl merge: resolve conflicts between main and litellm_oss_staging_03_11_2026 2026-03-12 09:38:31 -03:00
configmap-litellm.yaml feat(proxy): limit concurrent health checks with health_check_concurrency (#20584) 2026-02-24 08:16:59 -08:00
deployment.yaml feat: add read-replica routing for Prisma DB via DATABASE_URL_READ_REPLICA (#27493) 2026-05-08 21:05:50 -07:00
extra-resources.yaml add option to include additional resources to chart (#17627) 2025-12-07 23:25:57 -08:00
hpa.yaml (fix) releasing litellm helm as "litellm-helm" 2024-03-16 10:06:14 -07:00
ingress.yaml Helm Chart: add ingress-only labels (#17348) 2025-12-02 22:30:54 -08:00
keda.yaml feat: add support for keda in helm chart (#19337) 2026-01-19 10:38:41 -08:00
migrations-job.yaml feat(helm): add tpl support to extraContainers and extraInitContainers 2026-04-10 09:41:33 -04:00
NOTES.txt helm(chart): add optional PodDisruptionBudget for litellm proxy (#14062) (#14093) 2025-09-01 12:21:44 -07:00
poddisruptionbudget.yaml helm(chart): add optional PodDisruptionBudget for litellm proxy (#14062) (#14093) 2025-09-01 12:21:44 -07:00
secret-dbcredentials.yaml (fix) releasing litellm helm as "litellm-helm" 2024-03-16 10:06:14 -07:00
secret-masterkey.yaml Fix - Ensure Helm chart auto generated master keys follow sk-xxxx format (#13871) 2025-08-21 14:34:21 -07:00
service.yaml feat(helm): Add loadBalancerClass support for LoadBalancer services (#11064) 2025-05-22 22:45:14 -07:00
serviceaccount.yaml (fix) releasing litellm helm as "litellm-helm" 2024-03-16 10:06:14 -07:00
servicemonitor.yaml Enhancement(helm): ServiceMonitor template rendering (#17038) 2025-11-24 20:53:02 -08:00