[Feat] Add extraVolumes/extraVolumeMounts to routerSpec for readOnlyRootFilesystem#975
Conversation
…ject#966) Signed-off-by: immanuel-peter <immanuel.peter1@gmail.com>
There was a problem hiding this comment.
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.
| # -- 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 |
There was a problem hiding this comment.
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
Summary
Adds
extraVolumesandextraVolumeMountstorouterSpecso the router pod can run withreadOnlyRootFilesystem: true.Model containers already support writable mounts via
servingEngineSpec.modelSpec[].extraVolumes/extraVolumeMounts, but the router deployment had no equivalent. OnlycontainerSecurityContextwas configurable. Without writable mounts for paths like/tmpand/home, enabling a read-only root filesystem on the router would fail at runtime.FIX #966
Changes
routerSpec.extraVolumesandrouterSpec.extraVolumeMountstovalues.yaml(default[])deployment-router.yamlvalues.schema.jsonandhelm/README.mdExample
-swhen doinggit commit[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 thevllm_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:
pre-committo format your code. SeeREADME.mdfor installation.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
-swithgit commitwill 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.