Skip to content

[Feat] Add extraVolumes/extraVolumeMounts to routerSpec for readOnlyRootFilesystem#975

Merged
aeon-x merged 2 commits into
vllm-project:mainfrom
immanuel-peter:issue-966
Jun 17, 2026
Merged

[Feat] Add extraVolumes/extraVolumeMounts to routerSpec for readOnlyRootFilesystem#975
aeon-x merged 2 commits into
vllm-project:mainfrom
immanuel-peter:issue-966

Conversation

@immanuel-peter

Copy link
Copy Markdown
Contributor

Summary

Adds extraVolumes and extraVolumeMounts to routerSpec so the router pod can run with
readOnlyRootFilesystem: true.

Model containers already support writable mounts via servingEngineSpec.modelSpec[].extraVolumes / extraVolumeMounts, but the router deployment had no equivalent. Only containerSecurityContext was configurable. Without writable mounts for paths like /tmp and /home, enabling a read-only root filesystem on the router would fail at runtime.

FIX #966

Changes

  • Add routerSpec.extraVolumes and routerSpec.extraVolumeMounts to values.yaml (default [])
  • Render volume mounts and volumes in deployment-router.yaml
  • Update values.schema.json and helm/README.md

Example

routerSpec:
  containerSecurityContext:
    readOnlyRootFilesystem: true
  extraVolumes:
    - name: tmp-volume
      emptyDir: {}
    - name: home-volume
      emptyDir: {}
  extraVolumeMounts:
    - name: tmp-volume
      mountPath: /tmp
    - name: home-volume
      mountPath: /home

  • Make sure the code changes pass the pre-commit checks.
  • Sign-off your commit by using -s when doing git commit
  • Try to classify PRs for easy understanding of the type of changes, such as [Bugfix], [Feat], and [CI].
Detailed Checklist (Click to Expand)

Thank you for your contribution to production-stack! Before submitting the pull request, please ensure the PR meets the following criteria. This helps us maintain the code quality and improve the efficiency of the review process.

PR Title and Classification

Please try to classify PRs for easy understanding of the type of changes. The PR title is prefixed appropriately to indicate the type of change. Please use one of the following:

  • [Bugfix] for bug fixes.
  • [CI/Build] for build or continuous integration improvements.
  • [Doc] for documentation fixes and improvements.
  • [Feat] for new features in the cluster (e.g., autoscaling, disaggregated prefill, etc.).
  • [Router] for changes to the vllm_router (e.g., routing algorithm, router observability, etc.).
  • [Misc] for PRs that do not fit the above categories. Please use this sparingly.

Note: If the PR spans more than one category, please include all relevant prefixes.

Code Quality

The PR need to meet the following code quality standards:

  • Pass all linter checks. Please use pre-commit to format your code. See README.md for installation.
  • The code need to be well-documented to ensure future contributors can easily understand the code.
  • Please include sufficient tests to ensure the change is stay correct and robust. This includes both unit tests and integration tests.

DCO and Signed-off-by

When contributing changes to this project, you must agree to the DCO. Commits must include a Signed-off-by: header which certifies agreement with the terms of the DCO.

Using -s with git commit will automatically add this header.

What to Expect for the Reviews

We aim to address all PRs in a timely manner. If no one reviews your PR within 5 days, please @-mention one of YuhanLiu11
, Shaoting-Feng or ApostaC.

…ject#966)

Signed-off-by: immanuel-peter <immanuel.peter1@gmail.com>

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Code Review

This pull request adds support for configuring additional volumes (extraVolumes) and volume mounts (extraVolumeMounts) for the router pod and container in the Helm chart, updating the deployment template, values schema, default values, and README documentation. A review comment suggests correcting the indentation of the commented-out examples in values.yaml to prevent invalid YAML syntax if a user uncomments them directly.

Comment thread helm/values.yaml
Comment on lines +440 to +451
# -- Additional volumes to add to the router pod, in Kubernetes volume format
extraVolumes: []
# - name: tmp-volume
# emptyDir: {}
# - name: home-volume
# emptyDir: {}
# -- Additional volume mounts to add to the router container, in Kubernetes volumeMount format
extraVolumeMounts: []
# - name: tmp-volume
# mountPath: /tmp
# - name: home-volume
# mountPath: /home

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

medium

The commented-out examples for extraVolumes and extraVolumeMounts are indented with extra spaces relative to their keys, and the keys are initialized with []. If a user uncomments these examples directly, it will result in invalid YAML because a block sequence cannot be nested under a flow sequence ([]).\n\nTo make it easier and safer for users to uncomment and use these examples, we should align the commented-out block items at the correct indentation level.

  # -- Additional volumes to add to the router pod, in Kubernetes volume format\n  extraVolumes: []\n  # - name: tmp-volume\n  #   emptyDir: {}\n  # - name: home-volume\n  #   emptyDir: {}\n  # -- Additional volume mounts to add to the router container, in Kubernetes volumeMount format\n  extraVolumeMounts: []\n  # - name: tmp-volume\n  #   mountPath: /tmp\n  # - name: home-volume\n  #   mountPath: /home

@ruizhang0101 ruizhang0101 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

LGTM

@aeon-x aeon-x enabled auto-merge (squash) June 17, 2026 19:18
@aeon-x aeon-x merged commit 49420e4 into vllm-project:main Jun 17, 2026
1 of 2 checks passed
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.

feature: add extraVolumes/extraVolumeMounts to routerSpec

3 participants