Skip to content

fix(llm-routing): keep plaintext gRPC independent of QUIC trust - #1372

Merged
sbaum1994 merged 2 commits into
mainfrom
fix/pylon-nvca-plaintext-trust
Aug 31, 2026
Merged

fix(llm-routing): keep plaintext gRPC independent of QUIC trust#1372
sbaum1994 merged 2 commits into
mainfrom
fix/pylon-nvca-plaintext-trust

Conversation

@sbaum1994

@sbaum1994 sbaum1994 commented Aug 30, 2026

Copy link
Copy Markdown
Collaborator

TL;DR

Keep the reverse-QUIC trust bundle out of plaintext Stargate gRPC registration while preserving verified HTTPS registration.

Additional Details

Pylon reverse mode uses STARGATE_TLS_CERT_PATH as its QUIC trust anchor. NVCA also injected the same bundle through STARGATE_GRPC_TLS_CA_CERT_PATH. Current Pylon releases then attempted to load that gRPC CA even when --stargate-address used explicit HTTP, preventing worker registration.

This PR fixes both ends of that contract:

  • NVCA injects the merged bundle as a gRPC CA only for an HTTPS request-router address.
  • Pylon falls back to the reverse-QUIC trust bundle only for an HTTPS registration seed.
  • An explicit gRPC CA retains precedence.
  • Reverse QUIC continues using its existing trust input.

The paired changes belong together because either change alone still leaves the current released counterpart applying the CA to plaintext registration.

Customer Release Notes

Self-managed LLM workers can register over explicit plaintext in-cluster gRPC while continuing to authenticate reverse QUIC independently.

Plan Summary

No Kubernetes resources or public API shapes change. Worker environment injection becomes scheme-aware.

Usage

No operator action is required. HTTPS endpoints continue to use the configured trust bundle. Explicit HTTP and scheme-less development endpoints remain plaintext.

For the Reviewer

Please review the address-precedence behavior in llmWorkerUsesHTTPSRegistration and the Pylon fallback ordering in load_grpc_tls_ca_cert.

For QA

QA needed: publish and consume both component artifacts through #1362, then run the final self-managed BDD integration.

Tests run:

  • go test ./internal/transporttls with the required NVCA linker flag
  • go test ./pkg/nvca -run TestCreatePodArtifactInstancesTransportTLSBundleInjectsOnlyLLMWorker with the required linker flag
  • go test ./internal/miniservice with Kubernetes 1.34 envtest assets and the required linker flag
  • golangci-lint --new-from-rev=origin/main for the affected NVCA packages
  • cargo test -p pylon
  • cargo clippy -p pylon --all-targets -- -D warnings
  • cargo fmt --all -- --check
  • git diff --check

Notes

The NVCA make test wrapper requires an ignored .env file that is absent from the public checkout, so the affected packages were run directly with the documented linker and envtest settings.

Package-wide NVCA lint still reports three existing goconst findings in unrelated MiniService files. Linting only changes from origin/main reports zero issues.

Issues

Closes #1367

Related Pull Requests

Dependencies

No new or updated third-party dependencies. NOTICE is unchanged.

Checklist

  • I am familiar with the Contributing Guidelines.
  • I have signed off my commits for Developer Certificate of Origin (DCO) compliance.
  • New or existing tests cover these changes.
  • The documentation is up to date with these changes.

Summary by CodeRabbit

  • Bug Fixes
    • Improved TLS configuration for LLM workers using plaintext router registration.
    • gRPC CA certificates are now provided only when HTTPS registration is detected.
    • Explicitly configured certificate paths remain supported.
    • Prevented QUIC trust bundles from being incorrectly reused as gRPC CA certificates for HTTP registration.
    • Added coverage for HTTPS detection across command-line and environment-based settings.

Apply the merged transport bundle to Stargate gRPC only for HTTPS registration while preserving reverse-QUIC trust and explicit gRPC CA overrides.

Closes #1367

Signed-off-by: Stephanie Baum <sbaum@nvidia.com>
@sbaum1994
sbaum1994 requested review from a team as code owners August 30, 2026 18:42
@coderabbitai

coderabbitai Bot commented Aug 30, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: aaec11b6-662d-4472-8f70-e59378fbe03a

📥 Commits

Reviewing files that changed from the base of the PR and between de77aa4 and 44950cc.

📒 Files selected for processing (6)
  • src/compute-plane-services/nvca/internal/miniservice/controller_test.go
  • src/compute-plane-services/nvca/internal/miniservice/transport_tls_test.go
  • src/compute-plane-services/nvca/internal/transporttls/transport_tls.go
  • src/compute-plane-services/nvca/internal/transporttls/transport_tls_test.go
  • src/compute-plane-services/nvca/pkg/nvca/transport_tls_test.go
  • src/libraries/rust/stargate/crates/pylon/src/startup.rs

Included review availability: Your plan provides up to 12 included reviews per hour; 8 remain after this review.


📝 Walkthrough

Walkthrough

NVCA now injects the gRPC CA path only for HTTPS Stargate registration. Pylon applies the same condition when reusing reverse QUIC trust. Tests cover HTTP, HTTPS, address precedence, and explicit CA overrides.

Changes

LLM routing trust handling

Layer / File(s) Summary
NVCA conditional gRPC CA injection
src/compute-plane-services/nvca/internal/transporttls/transport_tls.go, src/compute-plane-services/nvca/internal/transporttls/transport_tls_test.go, src/compute-plane-services/nvca/internal/miniservice/*_test.go, src/compute-plane-services/nvca/pkg/nvca/transport_tls_test.go
NVCA detects HTTPS registration from command-line and environment addresses. It always injects CertPathEnv, but injects GrpcTLSCACertPathEnv only for HTTPS. Tests cover plaintext routers, HTTPS detection precedence, explicit CA values, and updated expectations.
Pylon conditional trust reuse
src/libraries/rust/stargate/crates/pylon/src/startup.rs
Pylon reuses the reverse QUIC trust bundle for gRPC only when the Stargate registration address uses HTTPS. Explicit gRPC CA paths retain precedence, and HTTP registration tests verify exclusion.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Merge Risk: ⚪ Minimal · up to 44950

Plaintext gRPC remains independent of the reverse-QUIC trust bundle while HTTPS registration keeps CA validation, and split-address handling remains unaffected. No actionable merge-blocking risk remains beyond normal checks.

Suggested reviewers: famousdirector

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 21.05% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 19 functions across 6 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title uses the required Conventional Commits format, includes the required scope for a fix, and accurately describes the plaintext gRPC and QUIC trust change.
Linked Issues check ✅ Passed The changes address issue #1367. NVCA injects the gRPC CA only for HTTPS, Pylon reuses reverse-QUIC trust only for HTTPS registration, explicit gRPC CA values retain precedence, reverse-QUIC behavior …
Out of Scope Changes check ✅ Passed All implementation and test changes directly support the linked issue. No unrelated files, public API changes, or Kubernetes resource changes are present.
Full details: Linked Issues check

Explanation

The changes address issue #1367. NVCA injects the gRPC CA only for HTTPS, Pylon reuses reverse-QUIC trust only for HTTPS registration, explicit gRPC CA values retain precedence, reverse-QUIC behavior remains intact, and focused HTTP/HTTPS tests were added.

  • Fix all pre-merge checks with AI
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/pylon-nvca-plaintext-trust

Warning

Some tools did not complete. Review the errors below.

🔧 golangci-lint (2.12.2)

level=error msg="Running error: context loading failed: failed to load packages: failed to load packages: failed to load with go/packages: err: exit status 1: stderr: go: inconsistent vendoring in /src/compute-plane-services/nvca:\n\tgithub.com/NVIDIA/KAI-scheduler@v0.12.6: is explicitly required in go.mod, but not marked as explicit in vendor/modules.txt\n\tgithub.com/NVIDIA/k8s-dra-driver-gpu@v0.0.0-20251017125642-cfe35ffd3d2c: is explicitly required in go.mod, but not marked as explicit in vendor/modules.txt\n\tgithub.com/NVIDIA/nvcf/src/libraries/go/lib@v0.0.0-20260722095202-f5e2792f5630: is explicitly required in go.mod, but not marked as explicit in vendor/modules.txt\n\tgithub.com/aws/aws-sdk-go@v1.55.5: is explicitly required in go.mod, but not marked as explicit in vendor/modules.txt\n\tgithub.com/bombsimon/logrusr/v4@v4.1.0: is explicitly required in go.mod, but not marked as explicit in vendor/modules.txt\n\tgithub.com/evanphx/json-patch/v5@v5.9.11: is explicitly required in

... [truncated 21721 characters] ...

i: is replaced in go.mod, but not marked as replaced in vendor/modules.txt\n\tk8s.io/apiextensions-apiserver: is replaced in go.mod, but not marked as replaced in vendor/modules.txt\n\tk8s.io/apimachinery: is replaced in go.mod, but not marked as replaced in vendor/modules.txt\n\tk8s.io/client-go: is replaced in go.mod, but not marked as replaced in vendor/modules.txt\n\tk8s.io/component-base: is replaced in go.mod, but not marked as replaced in vendor/modules.txt\n\tsigs.k8s.io/controller-runtime: is replaced in go.mod, but not marked as replaced in vendor/modules.txt\n\tgolang.org/x/crypto: is replaced in go.mod, but not marked as replaced in vendor/modules.txt\n\n\tTo ignore the vendor directory, use -mod=readonly or -mod=mod.\n\tTo sync the vendor directory, run:\n\t\tgo mod vendor\n"

🔧 Clippy (1.97.1)

Clippy execution failed


Comment @coderabbitai help to get the list of available commands.

@github-actions

Copy link
Copy Markdown
Contributor

🛡️ CodeQL Analysis

🚨 Found 5 issue(s)

Severity Breakdown:

  • 🔴 Errors: 0
  • 🟡 Warnings: 0
  • 🔵 Notes: 0
📋 Top Issues

🔗 View full details in Security tab

🕐 Last updated: 2026-08-30 18:59:33 UTC | Commit: 44950cc

@sbaum1994
sbaum1994 merged commit 71647b3 into main Aug 31, 2026
23 checks passed
@sbaum1994
sbaum1994 deleted the fix/pylon-nvca-plaintext-trust branch August 31, 2026 06:04
@balajinvda

Copy link
Copy Markdown
Contributor

🎉 This PR is included in version stargate-v0.14.3 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix(llm-routing): keep plaintext gRPC independent of QUIC trust

2 participants