Skip to content

[helm] document every values, udpate json schema and various fix - #886

Merged
ruizhang0101 merged 7 commits into
vllm-project:mainfrom
enneitex:fix-cache-and-helm-schema
Apr 13, 2026
Merged

ruizhang0101 merged 7 commits into
vllm-project:mainfrom
enneitex:fix-cache-and-helm-schema

Conversation

@enneitex

@enneitex enneitex commented Mar 14, 2026 •

Copy link
Copy Markdown
Contributor

Contributes to #840
fixes #861
fixes #751

Diff is huge but more than 2k LoC are from unit tests and 1700 lines for the json schema

Changes

This PR is trying to fix a few things:

  • Some values referenced in the README.md were wrong or missing from the values.yaml.
  • Some values from values.yaml were not used in the templates
  • Some values in the template were missing in the values.yaml
  • A lot of stuff was not working around sharedPvcStorage.There was no way to only create a PVC while a lot of people have access to storageClass and dynamic provisioning. PV is only created when specifying a nfs server or a hostPath
  • cacheserverSpec and sharedPvcStorage were missing from the values so I added it with unit tests
  • The json schema is now based on the values.yaml and updated by a pre commit hook
  • Add an example for modelSpec and loraAdapters. they are not deployed by default but used to generate the schema

To help review the PR

The json schema diff is hard to review. I ran helm lint with each value file from the CI to make sure they respect the updated schema

for f in ../.github/values*.yaml; do echo "=== $f ==="; helm lint . -f "$f"; done
for f in ../tutorials/assets/values*.yaml; do echo "=== $f ==="; helm lint . -f "$f"; done

I also ran helm template on each value file from .github/values*.yaml and ../tutorials/assets/values*.yaml and compared the output between main and this branch.

Breaking changes

Before, this was enough to deploy the cache server

cacheserverSpec:
  replicaCount: 1

Now it needs the following values:

cacheserverSpec:
  enabled: true
  replicaCount: 1

Same thing for the rayClusters:

Before:

modelSpec:
  - name: "model"
    raySpec:
      headNode:
        requestCPU: 1

After:

modelSpec:
  - name: "model"
    raySpec:
      enabled: true
      headNode:
        requestCPU: 1

Even if the version is pre v1.0.0, a comment should be added to the release note and maybe a minor version bump (v0.2.0)

@enneitex enneitex changed the title [WIP]Fix cache and helm schema [WIP][helm] document every values, udpate json schema and various fix Mar 14, 2026
@gemini-code-assist

Copy link
Copy Markdown
Contributor

Summary of Changes

Hello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request significantly enhances the Helm chart for the vLLM production stack by improving configuration consistency, introducing a dedicated LMCache server specification, and integrating comprehensive observability features. It addresses several discrepancies between documentation and actual values, streamlines PVC management, and automates schema generation, making the deployment more robust and easier to monitor.

Highlights

  • Helm Chart Refactoring and Schema Updates: The Helm chart has undergone significant refactoring to improve consistency and completeness. This includes correcting discrepancies between README.md and values.yaml, ensuring all values are utilized, and adding missing values. The JSON schema for values.yaml is now automatically generated and updated via a pre-commit hook, enhancing validation and maintainability.
  • LMCache Server Integration: A dedicated cacheserverSpec has been introduced to configure the LMCache server deployment. This includes detailed settings for image, replicas, resource requests/limits, probes, and Kubernetes scheduling options, complete with new unit tests to ensure correct rendering.
  • Enhanced Observability Features: The Helm chart now directly integrates Prometheus ServiceMonitors for both serving engines and the router, along with Grafana Dashboards. This simplifies the deployment and configuration of monitoring for the vLLM stack, moving observability setup from separate scripts into the main chart.
  • Improved Shared PVC Storage Management: The sharedPvcStorage logic has been refined to better support dynamic provisioning of PersistentVolumeClaims, addressing previous limitations where only PVC creation was possible without dynamic provisioning options.

🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console.

Changelog
  • .github/curl-06-monitoring.sh
    • Added a new script to validate Prometheus ServiceMonitor and metrics for the router.
  • .github/port-forward.sh
    • Modified the pod readiness check to be more robust, ensuring all containers in vllm pods are ready.
  • .github/values-11-monitoring.yaml
    • Added a new example values file demonstrating monitoring configuration for serving engines, router, Grafana dashboards, and kube-prometheus-stack.
  • .gitignore
    • Added an entry to ignore Helm subchart archives (helm/charts/*.tgz).
  • .pre-commit-config.yaml
    • Added a pre-commit hook to automatically generate the Helm values JSON schema from helm/values.yaml.
  • README.md
    • Updated the link to observability documentation to point to the new location within helm/README.md.
  • helm/Chart.lock
    • Added a new file to lock Helm chart dependencies.
  • helm/Chart.yaml
    • Added kube-prometheus-stack and prometheus-adapter as subchart dependencies.
  • helm/README.md
    • Updated installation and uninstallation instructions to include helm dependency build.
    • Removed servingEngineSpec.maxUnavailablePodDisruptionBudget from the configuration table.
    • Added detailed configuration sections for servingEngineSpec.serviceMonitor and routerSpec.serviceMonitor.
    • Updated cacheserverSpec and sharedPvcStorage descriptions for clarity and new fields.
    • Introduced a new 'Observability' section with instructions for deploying the stack, accessing Grafana, and using Prometheus Adapter.
  • helm/dashboards/lmcache-dashboard.json
    • Added a new Grafana dashboard JSON file for LMCache metrics.
  • helm/dashboards/vllm-dashboard.json
    • Renamed observability/vllm-dashboard.json to helm/dashboards/vllm-dashboard.json.
  • helm/templates/_helpers.tpl
    • Refactored engine labels by introducing chart.engineCommonLabels to simplify label definitions.
  • helm/templates/dashboards.yaml
    • Added a new template to deploy Grafana dashboards as Kubernetes ConfigMaps when grafanaDashboards.enabled is true.
  • helm/templates/deployment-cache-server.yaml
    • Modified the conditional rendering to use cacheserverSpec.enabled.
    • Added support for cacheserverSpec.annotations, strategy, runtimeClassName, schedulerName, tolerations, securityContext, nodeSelector, and containerSecurityContext.
    • Updated image reference to use cacheserverSpec.image.repository and tag, and imagePullPolicy from values.
  • helm/templates/deployment-lora-controller.yaml
    • Updated conditional checks for sharedPvcStorage from hasKey to .enabled.
  • helm/templates/deployment-router.yaml
    • Simplified the setting of the LMCACHE_LOG_LEVEL environment variable.
  • helm/templates/deployment-vllm-multi.yaml
    • Added --- document separator for multi-document YAML.
    • Updated conditional checks for cacheserverSpec and sharedPvcStorage to use .enabled.
  • helm/templates/ray-cluster.yaml
    • Updated conditional checks for cacheserverSpec to use .enabled.
  • helm/templates/service-cache-server.yaml
    • Modified the conditional rendering to use cacheserverSpec.enabled.
    • Added support for cacheserverSpec.serviceAnnotations and dynamically set serviceType from values.
  • helm/templates/servicemonitor-engine.yaml
    • Added a new template to create a Prometheus ServiceMonitor for serving engines.
  • helm/templates/servicemonitor-router.yaml
    • Added a new template to create a Prometheus ServiceMonitor for the router.
  • helm/templates/shared-storage.yaml
    • Modified conditional rendering for PersistentVolume and PersistentVolumeClaim based on sharedPvcStorage.enabled and presence of hostPath or nfs settings.
    • Updated storageClassName and accessModes logic to be more flexible.
    • Added volumeName to PersistentVolumeClaim when a PersistentVolume is explicitly defined.
  • helm/test.sh
    • Added helm dependency build command before helm upgrade and helm install.
  • helm/tests/cacheserver_test.yaml
    • Added new unit tests for the cacheserverSpec deployment configuration.
  • helm/tests/dashboards_test.yaml
    • Added new unit tests for Grafana dashboards deployment as ConfigMaps.
  • helm/tests/imagePullSecrets_test.yaml
    • Updated existing tests to explicitly enable cacheserverSpec for relevant assertions.
  • helm/tests/lmcache_test.yaml
    • Added new unit tests to verify LMCache configuration in engine and Ray deployments when cacheserverSpec is enabled or disabled.
  • helm/tests/servicemonitor-engine_test.yaml
    • Added new unit tests for the engine ServiceMonitor configuration.
  • helm/tests/servicemonitor-router_test.yaml
    • Added new unit tests for the router ServiceMonitor configuration.
  • helm/tests/shared_storage_test.yaml
    • Added new unit tests for shared storage configurations, covering hostPath, NFS, and dynamic provisioning scenarios.
  • helm/values.schema.json
    • Updated the JSON schema to reflect new cacheserverSpec fields, grafanaDashboards, kube-prometheus-stack, prometheus-adapter configurations, and refined schema annotations for various fields.
  • helm/values.yaml
    • Updated servingEngineSpec with a schema annotation to skip properties.
    • Removed maxUnavailablePodDisruptionBudget from servingEngineSpec.
    • Added serviceMonitor configuration for servingEngineSpec and routerSpec.
    • Updated schema annotations for imagePullPolicy, minReplicas, maxReplicas, minAvailable, maxUnavailable, serviceType, nodePort, serviceDiscovery, and k8sServiceDiscoveryType.
    • Introduced cacheserverSpec with detailed configuration options.
    • Added grafanaDashboards, kube-prometheus-stack, and prometheus-adapter configurations.
  • observability/README.md
    • Removed the file, as its content has been integrated into helm/README.md.
  • observability/install.sh
    • Removed the file, as observability stack installation is now handled by the main Helm chart.
  • observability/kube-prom-stack.yaml
    • Removed the file, as its configuration has been integrated into the main Helm chart's values.yaml.
  • observability/lmcache-dashboard-cm.yaml
    • Removed the file, as the LMCache dashboard is now managed within helm/dashboards/lmcache-dashboard.json.
  • observability/prom-adapter.yaml
    • Removed the file, as its configuration has been integrated into the main Helm chart's values.yaml.
  • observability/uninstall.sh
    • Removed the file, as observability stack uninstallation is now handled by the main Helm chart.
  • tests/e2e/run-k8s-routing-test.sh
    • Added helm dependency build before helm upgrade and helm install commands.
  • tutorials/terraform/aks/README.md
    • Removed explicit helm_release resources for Prometheus Monitoring Stack.
    • Updated documentation to reflect integrated observability setup.
  • tutorials/terraform/aks/production-stack/helm.tf
    • Removed kube_prometheus_stack and prometheus_adapter resources, as they are now managed as subcharts.
  • tutorials/terraform/aks/production-stack/variables.tf
    • Removed prom_stack_yaml and prom_adapter_yaml variables.
  • tutorials/terraform/aks/production_stack_specification.yaml
    • Added serviceMonitor.enabled: true to servingEngineSpec and routerSpec.
    • Enabled grafanaDashboards, kube-prometheus-stack, and prometheus-adapter with example rules.
  • tutorials/terraform/gke/README.md
    • Updated documentation to reflect integrated observability setup.
  • tutorials/terraform/gke/production-stack/helm.tf
    • Removed kube_prometheus_stack and prometheus_adapter resources, as they are now managed as subcharts.
  • tutorials/terraform/gke/production-stack/variables.tf
    • Removed prom_stack_yaml and prom_adapter_yaml variables.
  • tutorials/terraform/gke/production_stack_specification.yaml
    • Added serviceMonitor.enabled: true to servingEngineSpec and routerSpec.
    • Enabled grafanaDashboards, kube-prometheus-stack, and prometheus-adapter with example rules.
Ignored Files
  • Ignored by pattern: .github/workflows/** (2)
    • .github/workflows/functionality-helm-chart.yml
    • .github/workflows/helm-release.yml
Activity
  • The pull request is marked as 'Work In Progress' and is built on top of another PR, indicating ongoing development.
  • The author has run helm lint with various values files to ensure schema compliance.
  • The author has confirmed that pre-commit checks and commit signing requirements are met.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution. ↩

@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 introduces a significant number of improvements to the Helm chart, including enhanced documentation, a more robust values structure with JSON schema validation, and the integration of monitoring capabilities with Prometheus and Grafana. The changes also refactor the observability setup into the main Helm chart, making it more self-contained. My review focuses on improving the robustness of the new test scripts and simplifying some of the shell script logic.

Comment thread .github/curl-06-monitoring.sh Resolved
Comment thread .github/curl-06-monitoring.sh Resolved
Comment thread .github/curl-06-monitoring.sh Resolved
Comment thread .github/port-forward.sh Resolved
@enneitex
enneitex force-pushed the fix-cache-and-helm-schema branch 2 times, most recently from 3d51a7d to c357442 Compare March 19, 2026 21:34
@enneitex

Copy link
Copy Markdown
Contributor Author

/gemini review

@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 significantly improves the Helm chart by documenting all values, adding a pre-commit hook for JSON schema generation, and introducing comprehensive tests for various components. The templates have been refactored for better configurability and adherence to best practices, and several inconsistencies have been resolved. The enhanced shared-storage template, now supporting dynamic provisioning, is a notable improvement. I have one suggestion to ensure robustness in the cache server deployment template.

@enneitex

Copy link
Copy Markdown
Contributor Author

/gemini review

@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 introduces a significant and valuable refactoring of the Helm chart. The changes greatly improve the organization, documentation, and test coverage, making the chart more robust and easier to use. Key improvements include standardizing value paths, adding comprehensive documentation and JSON schema annotations to values.yaml, and introducing extensive unit tests for various components. The logic for handling shared storage and enabling/disabling components has also been clarified. I've identified a few minor areas for improvement related to quoting values in the templates to ensure the generated YAML is always valid. Overall, this is an excellent contribution.

Comment thread helm/templates/deployment-router.yaml Resolved
Comment thread helm/templates/ray-cluster.yaml Resolved
Comment thread helm/templates/ray-cluster.yaml Resolved
@enneitex
enneitex force-pushed the fix-cache-and-helm-schema branch from 28739f4 to 9e4c5ea Compare March 22, 2026 12:38
@enneitex
enneitex marked this pull request as ready for review March 23, 2026 22:33
@enneitex enneitex changed the title [WIP][helm] document every values, udpate json schema and various fix [helm] document every values, udpate json schema and various fix Mar 23, 2026
@AlexanderSing

Copy link
Copy Markdown
Contributor

Looking forward to the PR being merged, we also need the sharedPvcStorage fixes!

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

Thanks for refactoing the helm chart. This is really useful! I attached some comments, lemme know what you think :)

@enneitex
enneitex force-pushed the fix-cache-and-helm-schema branch 2 times, most recently from 3e86e26 to 95f9ba5 Compare March 31, 2026 18:55
@ruizhang0101

Copy link
Copy Markdown
Collaborator

Could you resolve the conflict and then I think it is good to go :)

@enneitex
enneitex force-pushed the fix-cache-and-helm-schema branch from 95f9ba5 to 228bc48 Compare April 2, 2026 21:12
@enneitex

enneitex commented Apr 2, 2026

Copy link
Copy Markdown
Contributor Author

Hey @ruizhang0101 the PR has been rebased.
Some tests are failing but it does not look related to this PR

Signed-off-by: enneitex <[email protected]>

feat(helm) improve testing around rayCluster and engine deployment

Signed-off-by: enneitex <[email protected]>

ci: retrigger

Signed-off-by: enneitex <[email protected]>

fix(tutorials) rename ScaledObject file name

Signed-off-by: enneitex <[email protected]>

fix pre-commit

Signed-off-by: enneitex <[email protected]>

@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 41b93c4 into vllm-project:main Apr 13, 2026
21 of 24 checks passed
@Reamer

Reamer commented Apr 14, 2026

Copy link
Copy Markdown

@enneitex
With this PR, you are setting the image for the cache service to lmcache/lmstack-cache-server. This image does not exist on Docker Hub.
The old image was lmcache/vllm-openai. I think this should be changed.

@enneitex

Copy link
Copy Markdown
Contributor Author

Hi,
I'll check this afternoon

@enneitex

Copy link
Copy Markdown
Contributor Author

Damn, I took the value from the README which mentioned lmcache/lmstack-cache-server, I'll open a small PR to update the values and readme

@Reamer

Reamer commented Apr 14, 2026 •

Copy link
Copy Markdown

Sorry, I have to add one more thing.
You also set the following default for the cache service.

  containerSecurityContext:
    runAsNonRoot: false

In my opinion, you should either set this value to true or leave it out and let the K8s platform's Pod Security Standards handle it.

@enneitex

Copy link
Copy Markdown
Contributor Author

No problem!
I opened #917

@Reamer

Reamer commented Apr 17, 2026

Copy link
Copy Markdown

I'm back. With this PR, you added the cacheserverSpec.livenessProbe value to values.yaml. I'm now encountering the following issue, and perhaps you know why this behavior is occurring.

Problem: The file /workspace/LMCache/examples/kubernetes/health_probe.py is missing in releases of lmcache/vllm-openai, so the LivenessProbe naturally fails and the pod restarts continuously.

In lmcache/vllm-openai:latest-nightly, the file is included, but it is not in the releases lmcache/vllm-openai:v0.4.3 and lmcache/vllm-openai:v0.4.2.

For now, I have removed the livenessProbe. It’s not ideal, but I wanted to let you know about it.

ikaadil pushed a commit to ikaadil/production-stack that referenced this pull request May 2, 2026
…m-project#886)

* fix(helm) update sharedPvcStorage so it correctly create PVC and/or PV

Signed-off-by: enneitex <[email protected]>

* fix(helm) various fix to align values, templates and README. update json schema

Signed-off-by: enneitex <[email protected]>

* fix(helm) use correct type for lmcacheControllerPort

Signed-off-by: enneitex <[email protected]>

* fix(helm) rayCluster: fix templating and add tests

Signed-off-by: enneitex <[email protected]>

* fix(helm) deployment-router: simplify templating and add tests

Signed-off-by: enneitex <[email protected]>

* feat(helm) improve schema, add tests and CI validation

Signed-off-by: enneitex <[email protected]>

feat(helm) improve testing around rayCluster and engine deployment

Signed-off-by: enneitex <[email protected]>

ci: retrigger

Signed-off-by: enneitex <[email protected]>

fix(tutorials) rename ScaledObject file name

Signed-off-by: enneitex <[email protected]>

fix pre-commit

Signed-off-by: enneitex <[email protected]>

---------

Signed-off-by: enneitex <[email protected]>
Co-authored-by: Rui Zhang <[email protected]>
Signed-off-by: Ifta Khairul Alam Adil <[email protected]>
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.

cacheserverSpec missing from values.schema.json feature: allow custom labels in helm chart for Ray workerGroup

4 participants