Skip to content

fix(self-managed): configure LLM router worker address - #678

Merged
mikeyrcamp merged 7 commits into
mainfrom
agent/fix-llm-router-worker-address
Aug 5, 2026
Merged

fix(self-managed): configure LLM router worker address#678
mikeyrcamp merged 7 commits into
mainfrom
agent/fix-llm-router-worker-address

Conversation

@mikeyrcamp

@mikeyrcamp mikeyrcamp commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

TL;DR

Configure the self-managed LLM request-router worker address in NVCF API remote configuration. Colocated deployments use the cluster-local service by default, while split deployments can provide a worker-reachable override.

Additional Details

Why

The self-managed stack did not populate the LLM request-router worker address consumed by generated LLM workers. Compute agents reject LLM launches without that address, so translation can fail before a worker pod is created. The stack has a stable cluster-local request-router service for colocated workers and needs a topology-owned override for split deployments.

What changed

  • Added global.workerEndpoints.llmRequestRouterAddress as an optional topology override.
  • Defaulted empty or omitted values to llm-request-router.nvcf.svc.cluster.local:50071.
  • Derived the cluster-local default and request-router chart service from the same configurable gRPC port.
  • Validated explicit DNS or IPv4 host:port and bracketed IPv6 host:port overrides, including port bounds.
  • Mapped the effective address through api.remoteConfig.configData.nvcf.llm-request-router.worker-address.
  • Kept disabled LLM deployments from receiving a staged worker address.
  • Removed redundant local fixture values so local rendering and BDD wiring exercise the default path.
  • Updated installation, enablement, local-development, and topology guidance.

Customer Release Notes

Self-managed LLM deployments with colocated workers now use llm-request-router.nvcf.svc.cluster.local:50071 automatically. Split deployments must override global.workerEndpoints.llmRequestRouterAddress with a request-router host and port reachable from worker pods.

Plan Summary

Configuration-only change. No Kubernetes resources, chart versions, or replica counts are added or changed. The stack supplies one existing API remote-config value when the LLM add-on is enabled.

Usage

Colocated deployments require no additional worker-address configuration. The cluster-local address follows addons.llm.requestRouter.service.grpcPort when a non-default service port is configured. For a split deployment, configure an override before enabling the LLM add-on:

global:
  workerEndpoints:
    llmRequestRouterAddress: router.example.com:50071

Testing

  • make -C deploy/stacks/self-managed test
  • go test -short ./... from tests/bdd
  • deploy/stacks/self-managed/tests/observability-autoscaler.sh
  • ./tools/ci/check-docs
  • Bash syntax validation
  • git diff --check

The local golangci-lint v2.11.4 invocation stopped before analysis with no go files to analyze; go list ./... and the BDD test suite both succeeded.

Notes

Split-cluster router network exposure is tracked separately in #689.

The worker address is not injected through api.env. No API chart bump is required because the pinned chart already supports the nested remote-config path.

References

Related Pull Requests

Dependencies

None. No third-party dependency, license, or NOTICE changes.

For the Reviewer

Please focus on the default and explicit-override behavior in deploy/stacks/self-managed/global.yaml.gotmpl and the corresponding regression coverage in deploy/stacks/self-managed/tests/llm-router-worker-address.sh.

For QA

QA is recommended for one colocated and one split-cluster LLM function launch. The focused render tests and non-live BDD suite are green.

Issues

Fixes #676

Checklist

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

Summary by CodeRabbit

  • New Features

    • Added configuration for the LLM request-router worker endpoint, with a cluster-local default and support for external or split-cluster deployments.
    • Added validation for DNS, IPv4, IPv6, and port formats, including gRPC port configuration.
    • Disabled LLM deployments no longer publish unused endpoint settings.
  • Documentation

    • Updated installation, topology, enablement, and troubleshooting guidance for LLM worker endpoint configuration.
  • Tests

    • Added coverage for default, custom, IPv4/IPv6, boundary-port, invalid, and disabled-LLM scenarios.

Signed-off-by: Mike Camp <mcamp@nvidia.com>
@coderabbitai

coderabbitai Bot commented Aug 5, 2026

Copy link
Copy Markdown

Review Change Stack

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review

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: 22195d71-77a2-4213-a5f7-7d66026652df

📥 Commits

Reviewing files that changed from the base of the PR and between a43933e and ff3d963.

📒 Files selected for processing (7)
  • deploy/stacks/self-managed/environments/base.yaml
  • deploy/stacks/self-managed/global.yaml.gotmpl
  • deploy/stacks/self-managed/tests/llm-router-worker-address.sh
  • docs/user/csp-end-to-end-example-installation.md
  • docs/user/helmfile-installation.md
  • docs/user/llm-function-enablement.md
  • docs/user/local-development/single-cluster-helmfile.md
🚧 Files skipped from review as they are similar to previous changes (6)
  • docs/user/helmfile-installation.md
  • docs/user/llm-function-enablement.md
  • deploy/stacks/self-managed/global.yaml.gotmpl
  • deploy/stacks/self-managed/environments/base.yaml
  • docs/user/csp-end-to-end-example-installation.md
  • deploy/stacks/self-managed/tests/llm-router-worker-address.sh

📝 Walkthrough

Walkthrough

The self-managed stack now configures and validates the LLM request-router worker address, renders it into API remote configuration when LLM is enabled, adds end-to-end coverage, and documents colocated and split-cluster deployment settings.

Changes

LLM router worker endpoint

Layer / File(s) Summary
Endpoint configuration and API mapping
deploy/stacks/self-managed/environments/base.yaml, deploy/stacks/self-managed/global.yaml.gotmpl
Adds the configurable worker endpoint, validates DNS, IPv4, IPv6, and port syntax, maps the result to nvcf.llm-request-router.worker-address when LLM is enabled, and propagates the configured gRPC port.
Rendering validation and test wiring
deploy/stacks/self-managed/tests/llm-router-worker-address.sh, deploy/stacks/self-managed/Makefile
Adds isolated Helmfile rendering tests for defaults, overrides, address formats, invalid values, disabled LLM, port propagation, and configuration ownership.
Deployment documentation
docs/user/csp-end-to-end-example-installation.md, docs/user/helmfile-installation.md, docs/user/llm-function-enablement.md, docs/user/local-development/single-cluster-helmfile.md
Documents cluster-local defaults, split-cluster overrides, endpoint reachability, remote-configuration mapping, and disabled-addon behavior.

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

Sequence Diagram(s)

sequenceDiagram
  participant Operator
  participant HelmfileEnvironment
  participant GlobalTemplate
  participant APIRemoteConfig
  participant LLMWorker
  Operator->>HelmfileEnvironment: configure worker endpoint
  HelmfileEnvironment->>GlobalTemplate: render endpoint
  GlobalTemplate->>GlobalTemplate: validate host and port
  GlobalTemplate->>APIRemoteConfig: write worker-address when LLM is enabled
  GlobalTemplate->>LLMWorker: set request-router gRPC port
Loading

Suggested reviewers: sbaum1994, kristinapathak

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 22.22% which is insufficient. The required threshold is 80.00%. 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 and accurately identifies the self-managed LLM router address bug fix.
Linked Issues check ✅ Passed The changes satisfy issue [#676] by configuring, validating, and propagating the router address while omitting it when LLM is disabled.
Out of Scope Changes check ✅ Passed All code, test, configuration, and documentation changes support the linked issue objectives.
✨ 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 agent/fix-llm-router-worker-address

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

@github-actions

github-actions Bot commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 4

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@deploy/stacks/self-managed/global.yaml.gotmpl`:
- Around line 262-266: Update the validation around
llmRequestRouterWorkerAddress to reject malformed worker addresses, requiring a
valid host and port while accepting bracketed IPv6 addresses. Preserve the
existing required-field failure when LLM is enabled and the address is empty,
and add rendering tests covering valid addresses plus router, :50071, and
router:not-a-port invalid cases.

In `@deploy/stacks/self-managed/tests/llm-router-worker-address.sh`:
- Line 10: Update the cleanup trap in the test script so it retains $work_dir
and its generated artifacts by default. Add an explicit opt-in cleanup option,
and only execute the rm -rf cleanup when that option is enabled, preserving the
existing cleanup behavior otherwise.
- Around line 92-96: Update the worker-address extraction in the in_router
parsing block to decode the quoted YAML scalar before returning it, removing the
surrounding YAML quotes so assert_remote_config_address compares host:port
values consistently.

In `@tests/bdd/fixtures/self-managed-local-bdd-multi.yaml`:
- Line 36: Replace the cluster-local llmRequestRouterAddress in the
multi-cluster BDD fixture with the worker-reachable external endpoint, and make
the same update in the raw multi-cluster seed in tests/bdd/godog_test.go; keep
both sources aligned so the multi-cluster topology uses the same externally
reachable router address everywhere.
🪄 Autofix

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: 82732107-f15a-4c7a-8608-601c6743e47b

📥 Commits

Reviewing files that changed from the base of the PR and between efc98c7 and 7de981e.

📒 Files selected for processing (12)
  • deploy/stacks/self-managed/Makefile
  • deploy/stacks/self-managed/environments/base.yaml
  • deploy/stacks/self-managed/global.yaml.gotmpl
  • deploy/stacks/self-managed/tests/llm-router-worker-address.sh
  • docs/user/csp-end-to-end-example-installation.md
  • docs/user/helmfile-installation.md
  • docs/user/llm-function-enablement.md
  • docs/user/local-development/single-cluster-helmfile.md
  • docs/user/samples/configs/local-dev-env.yaml
  • tests/bdd/fixtures/self-managed-local-bdd-multi.yaml
  • tests/bdd/fixtures/self-managed-local-bdd.yaml
  • tests/bdd/godog_test.go

Comment thread deploy/stacks/self-managed/global.yaml.gotmpl Outdated
Comment thread deploy/stacks/self-managed/tests/llm-router-worker-address.sh
Comment thread deploy/stacks/self-managed/tests/llm-router-worker-address.sh
Comment thread tests/bdd/fixtures/self-managed-local-bdd-multi.yaml Outdated
Signed-off-by: Mike Camp <mcamp@nvidia.com>

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@deploy/stacks/self-managed/tests/llm-router-worker-address.sh`:
- Around line 217-224: Extend the invalid_address_cases matrix with malformed
bracketed IPv6 inputs, including [::::]:50071, then update the
address-validation pattern in the global template to validate bracketed IPv6
syntax rather than allowing arbitrary additional colons. Ensure the new
malformed cases are rejected while valid bracketed IPv6 addresses continue to
render successfully.
🪄 Autofix

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: d8f39478-5251-4196-90e0-fb2ad2ade702

📥 Commits

Reviewing files that changed from the base of the PR and between 7de981e and 109256d.

📒 Files selected for processing (2)
  • deploy/stacks/self-managed/global.yaml.gotmpl
  • deploy/stacks/self-managed/tests/llm-router-worker-address.sh
🚧 Files skipped from review as they are similar to previous changes (1)
  • deploy/stacks/self-managed/global.yaml.gotmpl

Comment thread deploy/stacks/self-managed/tests/llm-router-worker-address.sh

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick comments (1)
deploy/stacks/self-managed/global.yaml.gotmpl (1)

262-263: 🗄️ Data Integrity & Integration | 🔵 Trivial | ⚡ Quick win

Use one source for the router gRPC port.

llmRequestRouter.service.grpcPort is configurable, but the self-managed defaults independently hard-code 50071. Derive the chart port and worker-address default from one stack value, then add a non-default-port rendering test.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@deploy/stacks/self-managed/global.yaml.gotmpl` around lines 262 - 263, Update
the llm-request-router address defaults near llmRequestRouterWorkerAddress to
derive the gRPC port from the configurable llmRequestRouter.service.grpcPort
stack value instead of hard-coding 50071. Use that same value when constructing
the chart service address, and add a rendering test that verifies a non-default
port is propagated to the worker endpoint default.

Source: Coding guidelines

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Nitpick comments:
In `@deploy/stacks/self-managed/global.yaml.gotmpl`:
- Around line 262-263: Update the llm-request-router address defaults near
llmRequestRouterWorkerAddress to derive the gRPC port from the configurable
llmRequestRouter.service.grpcPort stack value instead of hard-coding 50071. Use
that same value when constructing the chart service address, and add a rendering
test that verifies a non-default port is propagated to the worker endpoint
default.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: 2780d767-2900-4aab-bd2e-35de660687a7

📥 Commits

Reviewing files that changed from the base of the PR and between a43933e and c15e18b.

📒 Files selected for processing (6)
  • deploy/stacks/self-managed/environments/base.yaml
  • deploy/stacks/self-managed/global.yaml.gotmpl
  • deploy/stacks/self-managed/tests/llm-router-worker-address.sh
  • docs/user/csp-end-to-end-example-installation.md
  • docs/user/helmfile-installation.md
  • docs/user/llm-function-enablement.md
🚧 Files skipped from review as they are similar to previous changes (4)
  • deploy/stacks/self-managed/environments/base.yaml
  • docs/user/llm-function-enablement.md
  • docs/user/csp-end-to-end-example-installation.md
  • docs/user/helmfile-installation.md

@mikeyrcamp

Copy link
Copy Markdown
Contributor Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Aug 5, 2026

Copy link
Copy Markdown
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@mikeyrcamp
mikeyrcamp added this pull request to the merge queue Aug 5, 2026
Merged via the queue into main with commit 61b78e7 Aug 5, 2026
18 checks passed
@mikeyrcamp
mikeyrcamp deleted the agent/fix-llm-router-worker-address branch August 5, 2026 18:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Self-managed LLM deployments omit the request router worker address

3 participants