feat(stargate): reload TLS material without restarts - #777
Draft
mikeyrcamp wants to merge 3 commits into
Draft
Conversation
Watch mounted server identities and client trust bundles while retaining the last-known-good configuration after invalid rotations. Close established client connections when trust changes and expose reload, expiry, and readiness signals. Refs #599 Signed-off-by: Mike Camp <mcamp@nvidia.com>
|
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Enterprise Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Comment |
Contributor
Contributor
🛡️ CodeQL Analysis🚨 Found 2 issue(s) Severity Breakdown:
📋 Top Issues🔗 View full details in Security tab 🕐 Last updated: 2026-08-11 19:41:09 UTC | Commit: fa2e71f |
Keep the direct-client test focused on the missing-key contract by supplying a valid trust certificate, and update the reverse-listener assertion for path-level validation. Signed-off-by: Mike Camp <mcamp@nvidia.com>
Use notify 8.2.0 for directory change notifications and retain a five-minute reconciliation poll for missed events. Signed-off-by: Mike Camp <mcamp@nvidia.com>
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.
TL;DR
Hot-reload mounted TLS server identities and client trust bundles across Stargate, Pylon, and stargate-k8s-router. Projected certificate and key changes become active without restarting pods, while invalid updates retain the last-known-good configuration.
Additional Details
The affected services previously loaded certificates, private keys, and trust bundles only during startup. Kubernetes could rotate the mounted Secret symlinks, but existing processes continued using stale TLS material until they restarted.
This change adds a shared TLS reload implementation that:
The reload path is integrated into Stargate direct and reverse tunnels, Pylon direct and reverse tunnels, and stargate-k8s-router Raw QUIC and WebTransport paths. Reload counters, active certificate expiry gauges, expiry-aware readiness, chart guidance, metrics documentation, and an operator rotation runbook are included.
Customer Release Notes
NVCF request-routing components now detect and apply mounted TLS certificate, private-key, and trust-bundle rotations without requiring pod restarts.
Plan Summary
No Kubernetes resources are added or removed. Existing mounted TLS Secrets are watched in place. The chart deployment contract is unchanged.
Usage
Rotate the existing Kubernetes Secret using an atomic Secret update. Keep the certificate and private key in the same Secret. See the Transport TLS Rotation runbook for planned rotation, emergency trust removal, verification, and recovery steps.
For the Reviewer
Please focus on:
stargate-tlsAn independent review found no remaining Critical or Important correctness or security issues.
For QA
Self-managed QA was completed using an image built from this branch. Directory-watcher activation, server identity and client trust rotations, invalid-material rejection, last-known-good retention, readiness, metrics, and pod restart behavior were verified. Established connection replacement and closure are covered by the integration tests.
Testing
Passed:
stargate-tls,stargate,pylon-lib,pylon, andstargate-k8s-routercargo clippyfor all affected packages and targets with warnings deniedcargo fmt --all -- --checkgit diff --checkllm-request-routerusing the branch-built imageLive rotation results, including Kubernetes Secret projection time:
Notes
The canonical single-cluster Helmfile BDD flow passed rendering, control-plane installation, release assertions, NVCA registration, rollout, and backend health. The sample function deployment step remains blocked by a test-fixture instance type that the test API does not accept. Test-environment workarounds were limited to unavailable fixtures and images and are not part of this Pull Request.
Issues
Closes #599
References
Related Pull Requests
None.
Dependencies
Adds
notify8.2.0 under CC0-1.0. The license is allowed by the repository policy. No NOTICE update is required.Checklist