Skip to content

[FEAT][Helm] Support setting env for router#954

Merged
ruizhang0101 merged 3 commits into
vllm-project:mainfrom
treydock:router-env
May 27, 2026
Merged

[FEAT][Helm] Support setting env for router#954
ruizhang0101 merged 3 commits into
vllm-project:mainfrom
treydock:router-env

Conversation

@treydock

Copy link
Copy Markdown
Contributor

Allow setting custom environment variables for the router. Right now we run the router as a specific UID and have to map the username like so:

        env:
          - name: USER
            value: feithosu
          - name: LOGNAME
            value: feithosu

BEFORE SUBMITTING, PLEASE READ THE CHECKLIST BELOW AND FILL IN THE DESCRIPTION ABOVE


  • 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.

Signed-off-by: Trey Dockendorf <tdockendorf@osc.edu>

@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 enables the configuration of environment variables for the router component by adding an env field to the routerSpec. Changes include updating the deployment template to inject these variables, defining the field in the JSON schema, and providing a default empty list in values.yaml. Feedback suggests improving the JSON schema by explicitly defining the expected structure of the environment variable objects (e.g., name, value, valueFrom) to provide better validation for users.

Comment thread helm/values.schema.json
Comment on lines +494 to +497
"env": {
"description": "List of environment variables to set for the router",
"type": "array"
},

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

While consistent with other env definitions in this schema, it is generally a best practice to define the expected structure of the array items (e.g., objects with name, value, and valueFrom properties). This provides better validation for users when they provide custom environment variables.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

This would limit the types of environment variables, as it could be coming from secret ref or configmap ref and not strictly name/value. Add all the types seems overly burdensome to this project.

Signed-off-by: Trey Dockendorf <tdockendorf@osc.edu>

@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

@ruizhang0101 ruizhang0101 merged commit aef9df4 into vllm-project:main May 27, 2026
11 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.

2 participants