Skip to content

Conversation

@mohammedabdulwahhab
Copy link
Contributor

@mohammedabdulwahhab mohammedabdulwahhab commented Jul 3, 2025

Overview:

Add deployment CRDs for LLM and vllm_v0 examples, as those are supported in nvcr.io/nvidia/ai-dynamo/vllm-runtime:0.3.1. Also added CRDS for vllm_v1 to prepare for 0.3.2 runtime release

Details:

Where should the reviewer start?

Related Issues: (use one of the action keywords Closes / Fixes / Resolves / Relates to)

  • closes GitHub issue: #xxx

Summary by CodeRabbit

  • New Features
    • Introduced multiple Kubernetes deployment configurations for large language model (LLM) serving, including aggregation, disaggregation, and router-based setups.
    • Added support for multi-component deployments with dedicated services for frontend, processor, router, worker, prefill worker, planner, and Prometheus monitoring.
    • Enabled configuration of resource allocation (CPU, memory, GPU), environment variables, health checks, and secret management for secure deployments.

@copy-pr-bot
Copy link

copy-pr-bot bot commented Jul 3, 2025

This pull request requires additional validation before any workflows can run on NVIDIA's runners.

Pull request vetters can view their responsibilities here.

Contributors can view more details about this message here.

@pull-request-size pull-request-size bot added size/XL and removed size/L labels Jul 3, 2025
@hhzhang16 hhzhang16 marked this pull request as ready for review July 7, 2025 18:04
@hhzhang16 hhzhang16 changed the title feat: add crds for vllm_v0 feat: add crds for vllm_v0 and llm Jul 7, 2025
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jul 7, 2025

Walkthrough

Several new Kubernetes deployment YAML files are introduced, each defining a DynamoGraphDeployment for various large language model (LLM) serving architectures. These deployments describe multi-component systems with services such as Frontend, Processor, Router, VllmWorker, PrefillWorker, Planner, and Prometheus. Each service includes resource allocations, container images, environment variables, and runtime arguments.

Changes

File(s) Change Summary
examples/llm/deploy/agg.yaml Added deployment YAML for llm-agg with Frontend, Processor, and VllmWorker services.
examples/llm/deploy/agg_router.yaml Added deployment YAML for agg-router with Frontend, Processor, Router, and VllmWorker services.
examples/llm/deploy/disagg.yaml Added deployment YAML for llm-disagg with Frontend, Processor, VllmWorker, and PrefillWorker services.
examples/llm/deploy/disagg_router.yaml Added deployment YAML for disagg-router with Frontend, Processor, Router, VllmWorker, and PrefillWorker services.
examples/vllm_v0/deploy/agg.yaml Added deployment YAML for agg with Frontend and VllmWorker services.
examples/vllm_v0/deploy/disagg.yaml Added deployment YAML for disagg with Frontend, VllmWorker, and PrefillWorker services.
examples/vllm_v0/deploy/disagg_planner.yaml Added deployment YAML for disagg-planner with Frontend, VllmWorker, PrefillWorker, Planner, and Prometheus services.

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant Frontend
    participant Processor
    participant Router
    participant VllmWorker
    participant PrefillWorker
    participant Planner

    User->>Frontend: Send LLM inference request
    Frontend->>Processor: Forward request (if present)
    Processor->>Router: Route request (if present)
    Router->>VllmWorker: Dispatch for LLM computation
    VllmWorker->>PrefillWorker: Delegate prefill (if present)
    VllmWorker->>Frontend: Return result
    Frontend->>User: Respond with LLM output
    Frontend->>Planner: (Optional) Send metrics/feedback
    Planner->>Frontend: (Optional) Send new plan/instructions
Loading

Poem

In YAML fields, a rabbit hops,
Through Frontends, Workers, never stops.
Routers guide and Planners scheme,
GPUs whir and Prometheus gleams.
With every pod, the system grows—
Kubernetes magic, as everyone knows!
🐰✨


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 15

🧹 Nitpick comments (11)
examples/llm/deploy/disagg_router.yaml (2)

6-9: JSON-in-string is hard to maintain – move to a ConfigMap or |- block

The colossal, doubly-escaped JSON makes diffs & reviews painful and is error-prone (a stray quote will break the pod). Consider:

  1. Storing the JSON in a ConfigMap and valueFrom.configMapKeyRef, or
  2. Using a YAML multiline scalar (|-) to avoid the back-slash soup.

100-111: Pin container image by digest for immutability

nvcr.io/nvidia/ai-dynamo/vllm-runtime:0.3.1 can be retagged upstream, causing silent drift. Pin to a digest (@sha256:…) to guarantee bit-for-bit reproducibility.

examples/llm/deploy/agg_router.yaml (2)

6-9: Escape-heavy JSON string – favour ConfigMap or multiline scalar

All earlier rationale applies.


100-111: Pin image by digest

examples/vllm_v0/deploy/disagg.yaml (2)

6-9: Consider ConfigMap / multiline scalar for DYN_DEPLOYMENT_CONFIG


50-60: Pin runtime image by digest

Also applies to: 76-88

examples/llm/deploy/disagg.yaml (2)

6-9: Large escaped JSON – move to ConfigMap / multiline scalar


75-86: Pin image digest

Also applies to: 101-113

examples/vllm_v0/deploy/agg.yaml (2)

6-9: Prefer ConfigMap / multiline scalar for deployment config JSON


50-61: Pin container image digest

examples/llm/deploy/agg.yaml (1)

60-87: Consider declaring componentType: worker for VllmWorker

Processor is explicitly marked as a worker, but VllmWorker is not. For clarity and label consistency add it unless there is a deliberate reason to rely on defaults.

 VllmWorker:
   envFromSecret: hf-token-secret
   dynamoNamespace: llm-agg
+  componentType: worker
📜 Review details

Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 1630f8b and 3d953e3.

📒 Files selected for processing (7)
  • examples/llm/deploy/agg.yaml (1 hunks)
  • examples/llm/deploy/agg_router.yaml (1 hunks)
  • examples/llm/deploy/disagg.yaml (1 hunks)
  • examples/llm/deploy/disagg_router.yaml (1 hunks)
  • examples/vllm_v0/deploy/agg.yaml (1 hunks)
  • examples/vllm_v0/deploy/disagg.yaml (1 hunks)
  • examples/vllm_v0/deploy/disagg_planner.yaml (1 hunks)
🧰 Additional context used
🧠 Learnings (3)
examples/vllm_v0/deploy/disagg_planner.yaml (1)
Learnt from: julienmancuso
PR: ai-dynamo/dynamo#1365
File: deploy/cloud/operator/api/v1alpha1/dynamocomponentdeployment_types.go:171-178
Timestamp: 2025-06-04T13:09:53.416Z
Learning: The `DYN_DEPLOYMENT_CONFIG` environment variable (commonconsts.DynamoDeploymentConfigEnvVar) in the Dynamo operator will never be set via ValueFrom (secrets/config maps), only via direct Value assignment. The GetDynamoDeploymentConfig method correctly only checks env.Value for this specific environment variable.
examples/vllm_v0/deploy/disagg.yaml (1)
Learnt from: julienmancuso
PR: ai-dynamo/dynamo#1365
File: deploy/cloud/operator/api/v1alpha1/dynamocomponentdeployment_types.go:171-178
Timestamp: 2025-06-04T13:09:53.416Z
Learning: The `DYN_DEPLOYMENT_CONFIG` environment variable (commonconsts.DynamoDeploymentConfigEnvVar) in the Dynamo operator will never be set via ValueFrom (secrets/config maps), only via direct Value assignment. The GetDynamoDeploymentConfig method correctly only checks env.Value for this specific environment variable.
examples/llm/deploy/agg.yaml (3)
Learnt from: nnshah1
PR: ai-dynamo/dynamo#1444
File: tests/fault_tolerance/scenarios.py:57-57
Timestamp: 2025-07-01T15:39:56.789Z
Learning: The fault tolerance tests in tests/fault_tolerance/ are designed to run only in the mounted container environment, so hardcoded absolute paths with `/workspace/` prefix are intentional and should not be changed to relative paths.
Learnt from: julienmancuso
PR: ai-dynamo/dynamo#1365
File: deploy/cloud/operator/api/v1alpha1/dynamocomponentdeployment_types.go:171-178
Timestamp: 2025-06-04T13:09:53.416Z
Learning: The `DYN_DEPLOYMENT_CONFIG` environment variable (commonconsts.DynamoDeploymentConfigEnvVar) in the Dynamo operator will never be set via ValueFrom (secrets/config maps), only via direct Value assignment. The GetDynamoDeploymentConfig method correctly only checks env.Value for this specific environment variable.
Learnt from: biswapanda
PR: ai-dynamo/dynamo#1266
File: deploy/cloud/operator/internal/controller/dynamocomponentdeployment_controller.go:85-85
Timestamp: 2025-05-29T16:29:45.152Z
Learning: In the Dynamo codebase, ComponentTypePlanner constants with different cases ("Planner" vs "planner") are intentional and serve different purposes: component type in config vs component label. These should not be made consistent as they handle different contexts.
🪛 GitHub Actions: Copyright Checks
examples/vllm_v0/deploy/agg.yaml

[error] 1-1: Invalid or missing copyright header detected. Please add the required SPDX copyright and license header.

examples/llm/deploy/disagg_router.yaml

[error] 1-1: Invalid or missing copyright header detected. Please add the required SPDX copyright and license header.

examples/vllm_v0/deploy/disagg_planner.yaml

[error] 1-1: Invalid or missing copyright header detected. Please add the required SPDX copyright and license header.

examples/llm/deploy/agg_router.yaml

[error] 1-1: Invalid or missing copyright header detected. Please add the required SPDX copyright and license header.

examples/vllm_v0/deploy/disagg.yaml

[error] 1-1: Invalid or missing copyright header detected. Please add the required SPDX copyright and license header.

examples/llm/deploy/disagg.yaml

[error] 1-1: Invalid or missing copyright header detected. Please add the required SPDX copyright and license header.

examples/llm/deploy/agg.yaml

[error] 1-1: Invalid or missing copyright header detected. Please add the required SPDX copyright and license header.

⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: Build and Test - vllm
🔇 Additional comments (6)
examples/llm/deploy/disagg_router.yaml (1)

86-88: Verify presence of hf-token-secret in target namespace

The pods will crash-loop if the secret is missing or mis-named. Ensure the secret exists in llm-disagg-router.

Also applies to: 113-115

examples/llm/deploy/agg_router.yaml (1)

86-88: Ensure hf-token-secret exists in llm-agg-router namespace

examples/vllm_v0/deploy/disagg.yaml (1)

37-38: Verify hf-token-secret availability in vllm-v0-disagg

Also applies to: 64-65

examples/llm/deploy/disagg.yaml (1)

61-62: Confirm hf-token-secret exists in llm-disagg namespace

Also applies to: 88-89

examples/vllm_v0/deploy/agg.yaml (1)

36-37: Check presence of hf-token-secret in vllm-v0-agg namespace

examples/vllm_v0/deploy/disagg_planner.yaml (1)

132-142: Prometheus pod is launching LLM code, not Prometheus

Running graphs.disagg_planner:Frontend inside the Prometheus pod is almost certainly unintentional.
Verify whether you really want Prometheus, and if so switch to the proper image/args (prom/prometheus etc.) or a dedicated Dynamo graph component if one exists.

@hhzhang16 hhzhang16 changed the title feat: add crds for vllm_v0 and llm feat: add crds for vllm and llm examples Jul 7, 2025
@hhzhang16 hhzhang16 enabled auto-merge (squash) July 7, 2025 23:42
@hhzhang16 hhzhang16 merged commit 5505507 into main Jul 7, 2025
8 checks passed
@hhzhang16 hhzhang16 deleted the mabdulwahhab/add-crds-to-examples branch July 7, 2025 23:44
atchernych pushed a commit that referenced this pull request Jul 9, 2025
Signed-off-by: mohammedabdulwahhab <furkhan324@berkeley.edu>
Co-authored-by: Hannah Zhang <hannahz@nvidia.com>
Co-authored-by: hhzhang16 <54051230+hhzhang16@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants