Repository navigation
feat(k8s): keep gateway virtual keys in a CloudNativePG database - #3747
Conversation
…database Add Cluster llm-gateway-db with its perimeter, let the operator generate the Secret that the gateway reads as DATABASE_URL, migrate on a read-only root through LITELLM_MIGRATION_DIR, and install the operator with stack infra so stack llm applies the database after the Helm releases. Refs #1635
… failed migration Refs #1635
Rollout: what happens to the gatewayArgo CD applies the merge at once. No person runs a command, and the gateway has no downtime that a person must plan for.
Migrations: the first start applies all LiteLLM migrations to the empty database. A later LiteLLM upgrade runs the new migrations the same way, and a failed one stops the pod instead of a start on an old schema. Risk that a person should know about: the database has one instance and no backup yet (#3741). A lost node loses the virtual keys, and a person mints them again. The cluster Jobs keep the master key, which needs no database. If the new pod never becomes ready (for example the operator is missing), the old pod stays in service, and the rollout waits. The operator is Helm release Review findings
All three findings were correct. Checks run
|
🤖 I have created a release *beep* *boop* --- ## [0.67.0](v0.66.0...v0.67.0) (2026-11-06) ### Features * **k8s:** keep gateway virtual keys in a CloudNativePG database ([#3747](#3747)) ([44d9196](44d9196)), closes [#1635](#1635) ### Bug Fixes * **docs:** rule documents name files that are gone or moved ([#3756](#3756)) ([0be8f7f](0be8f7f)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). Co-authored-by: dan-petty-release[bot] <346998822+dan-petty-release[bot]@users.noreply.github.com>
The LiteLLM gateway keeps virtual keys only in a Postgres database. This adds the CloudNativePG Cluster llm-gateway-db with its network policy. The operator generates the Secret that the gateway reads as DATABASE_URL, so git holds no password and no person step is needed. The gateway migrates on a read-only root, stops its start-up on a failed migration, and stays in the Service while the database is down, so only virtual keys are refused. The operator moves to stack infra, and deploy-stack applies the database after the Helm releases.
Closes #1635
Change:
openspec/changes/archive/2026-11-06-1635-gateway-database/