feat(stargate): add TOML configuration - #1424
Draft
barrygreengus wants to merge 1 commit into
Draft
Conversation
Add strict, section-based TOML configuration with config-file precedence and a deprecated CLI fallback. Migrate Helm and benchmark launchers to mounted configuration files, and remove generic DNS-based Stargate discovery while retaining Kubernetes pod discovery. Dependencies: toml 1.1.4 and serde_with 3.22.0 (MIT OR Apache-2.0). Refs #1423
|
Important Draft PR not reviewedDraft PRs are not automatically reviewed by default.
To automatically review draft PRs, update your CodeRabbit configuration: reviews:
auto_review:
drafts: trueComment |
Contributor
🛡️ CodeQL Analysis🚨 Found 5 issue(s) Severity Breakdown:
📋 Top Issues🔗 View full details in Security tab 🕐 Last updated: 2026-08-31 21:56:01 UTC | Commit: 5bfbdf6 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
Stargate configuration is currently spread across a large flat set of CLI flags and environment variables. Related settings are hard to understand as a unit, and mode flags can become inconsistent with the options they control. Stargate also retained a generic DNS discovery path even though current deployments use DNS only to enumerate local Kubernetes pods and use explicit Watch URLs for remote Stargates.
What changed
toml, andserde_with.--config-file PATH. When present, the file is the complete source of configuration and every legacy CLI or environment setting is ignored.STARGATE_CONFIG_FILE_PLAN.md.Customer Release Notes
Stargate can now load structured TOML configuration with
--config-file. Legacy CLI and environment configuration remains available during the deprecation period and emits a warning.Plan Summary
The request-router chart now creates a Stargate configuration ConfigMap, mounts it read-only at
/etc/stargate/stargate.toml, and starts Stargate with only--config-file. Kubernetes pod discovery is selected by the rendered topology: multi-pod and backend-router topologies include the section, while a single direct Deployment omits it and uses self-only discovery.Usage
When
--config-fileis present, all other Stargate CLI flags and their environment-backed values are ignored. Invalid files fail startup without falling back to legacy settings.Testing
cargo test -p stargatecargo test -p stargate-benchCARGO_INCREMENTAL=0 cargo clippy -p stargate -p stargate-bench --all-targets -- -D warningscargo fmt --all -- --checkmake testindeploy/helm/llm-request-routerhelm lint llm-request-router --set llmRequestRouter.image.repository=stargatehelm templatefor the documented release name and namespace.bazel build //src/libraries/rust/stargate/crates/stargate:stargatebazel test //src/libraries/rust/stargate/crates/stargate:stargate_test --test_output=errorsdeploy/stacks/self-managed/tests/llm-router-local-chart.shandcheck-llm-pki-issuer.shwere not run becausehelmfileis not installed in the local environment. Their local-chart render expectations were updated, and the underlying chart render suites pass. No additional QA is required beyond CI.Notes
The deprecated
--disable-dns-discoveryflag remains only in the legacy CLI compatibility path. The chart-leveldisableDnsDiscoveryvalue was removed because topology now controls whether the Kubernetes pod discovery section exists.Issues
Closes #1423
References
Related Pull Requests
None.
Dependencies
toml1.1.4, licensed MIT or Apache-2.0.serde_with3.22.0, licensed MIT or Apache-2.0.