Skip to content

feat(helm) add monitoring conf as a sub chart - #860

Merged
ruizhang0101 merged 2 commits into
vllm-project:mainfrom
enneitex:refactor-monitoring
Mar 19, 2026
Merged

ruizhang0101 merged 2 commits into
vllm-project:mainfrom
enneitex:refactor-monitoring

Conversation

@enneitex

@enneitex enneitex commented Feb 27, 2026 •

Copy link
Copy Markdown
Contributor

Contributes to #840

The goal of this PR is to be more flexible about the monitring part of this chart. Currently there is no way to use an existing prometheus stack.
By adding a few resources in the chart and prometheus as a sub-chart, it allows user to fully customize their installation, from only a serviceMonitor to a whole prometheus stack

Technical changes:

  • Add serviceMonitor directly to the helm chart.
  • Add grafana dashboards to the helm chart.
  • Add kube-prometheus-stack and prometheus-adapter as sub-charts.
  • Update the documentation that mentioned the old installation method.

Step to validate the PR:

  1. Install the helm chart with the following values (+ your values with modelSpec etc...)
servingEngineSpec:
  serviceMonitor:
    enabled: true
routerSpec:
  serviceMonitor:
    enabled: true
kube-prometheus-stack:
  enabled: true
prometheus-adapter:
  enabled: true
  1. get the admin password for grafana, stored in a secret <release-name>-grafana

  2. Port foward grafana UI and login: kubectl port-forward svc/<release-name>-grafana 8080:80. Two vLLM dashboards should be present, with data if there are request made to the models

helm install llmstack . -f observability.yaml
kubectl get secret llmstack-grafana -oyaml
kubectl port-forward service/llmstack-grafana 8080:80
  • 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.

@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 monitoring capabilities of the production stack by transitioning from a script-based deployment to a fully integrated Helm sub-chart approach. This change allows users greater flexibility in managing their monitoring infrastructure, whether by deploying a complete Prometheus stack or integrating with an existing one, while also providing out-of-the-box Grafana dashboards for key vLLM metrics.

Highlights

  • Monitoring Integration: Integrated kube-prometheus-stack and prometheus-adapter as sub-charts directly into the main Helm chart, providing a more flexible and customizable monitoring solution.
  • Grafana Dashboards: Added Grafana dashboards for vLLM and LMCache directly into the Helm chart, enabling their deployment as ConfigMaps when grafanaDashboards.enabled is true.
  • Refactored Monitoring Deployment: Removed the previous script-based monitoring installation (install.sh, uninstall.sh, and associated YAML files), streamlining the deployment process through Helm.
  • Prometheus Adapter Configuration: Included custom rules within the prometheus-adapter configuration in values.yaml to expose vLLM-specific metrics for Horizontal Pod Autoscaling (HPA).

🧠 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
  • helm/Chart.lock
    • Added kube-prometheus-stack and prometheus-adapter as locked dependencies.
  • helm/Chart.yaml
    • Declared kube-prometheus-stack and prometheus-adapter as conditional dependencies.
  • helm/README.md
    • Added a new 'Monitoring' section with a 'TODO' placeholder.
  • helm/dashboards/lmcache-dashboard.json
    • Added a new Grafana dashboard JSON file for LMCache metrics.
  • helm/dashboards/vllm-dashboard.json
    • Renamed and moved the existing vLLM Grafana dashboard from observability/vllm-dashboard.json.
  • helm/templates/dashboards.yaml
    • Added a new Helm template to dynamically create ConfigMaps for Grafana dashboards from JSON files.
  • helm/values.yaml
    • Introduced new configuration sections for grafanaDashboards, kube-prometheus-stack, and prometheus-adapter, including custom metric rules.
  • observability/install.sh
    • Removed the bash script previously used for installing monitoring components.
  • observability/kube-prom-stack.yaml
    • Removed the YAML configuration file for the kube-prometheus-stack.
  • observability/lmcache-dashboard-cm.yaml
    • Removed the ConfigMap definition for the LMCache dashboard.
  • observability/uninstall.sh
    • Removed the bash script previously used for uninstalling monitoring components.
Activity
  • The pull request is currently marked as 'Work In Progress' (WIP).
  • The author, enneitex, has completed the pre-commit checks, signed off the commit, and classified the PR as a feature (feat).
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 significantly improves the monitoring setup by migrating from installation scripts to Helm sub-charts for kube-prometheus-stack and prometheus-adapter. This change makes the monitoring configuration more flexible, declarative, and aligned with Helm best practices. The dynamic creation of Grafana dashboard ConfigMaps is also a welcome addition. While the overall direction is excellent, I've identified a critical issue with the Prometheus URL configuration that will likely cause connection failures. I've also suggested changing the default behavior to make the monitoring stack opt-in rather than opt-out, and pointed out a documentation TODO that needs to be addressed. Additionally, please note that observability/README.md is now outdated and should be updated or removed to avoid confusion.

Comment thread helm/values.yaml Resolved
Comment thread helm/README.md Resolved
Comment thread helm/values.yaml Resolved
Comment thread helm/values.yaml Resolved
@enneitex
enneitex force-pushed the refactor-monitoring branch 9 times, most recently from c176cf5 to 3c8a184 Compare February 27, 2026 23:28
@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 refactors the monitoring setup by replacing the script-based installation with Helm sub-charts for Prometheus and Grafana. This is a significant improvement in terms of flexibility and maintainability. The changes include adding kube-prometheus-stack and prometheus-adapter as dependencies, creating ServiceMonitor resources for the engine and router, and managing Grafana dashboards as ConfigMaps. Overall, the changes are well-structured. I've found one critical issue regarding YAML indentation in a new template file that needs to be addressed.

Comment thread helm/templates/dashboards.yaml Resolved
@enneitex
enneitex force-pushed the refactor-monitoring branch from 3c8a184 to 87a486b Compare February 28, 2026 10:54
@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 refactors the monitoring configuration by adding kube-prometheus-stack and prometheus-adapter as conditional sub-chart dependencies, which improves flexibility. The changes include adding ServiceMonitor resources for the serving engine and router, and a mechanism to deploy Grafana dashboards from JSON files. The old script-based monitoring installation is correctly removed. The configuration for these new features is exposed in values.yaml and documented in the README.md. I have a couple of suggestions to improve the robustness of the new templates and fix an issue in a generated file.

Comment thread helm/Chart.lock Resolved
@enneitex
enneitex force-pushed the refactor-monitoring branch from 223a1cf to 29106fa Compare March 1, 2026 14:52
@enneitex

enneitex commented Mar 1, 2026

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 monitoring setup by refactoring it from a script-based installation to a more flexible and idiomatic Helm subchart approach. The changes include adding kube-prometheus-stack and prometheus-adapter as dependencies, introducing ServiceMonitor resources for both the serving engine and the router, and providing Grafana dashboards as config maps. The documentation and examples have been updated accordingly.

My review found a minor issue in the documentation that could be improved for clarity. Overall, this is a great enhancement that makes the monitoring configuration much more customizable and easier to manage for users.

Comment thread helm/README.md Resolved
@enneitex
enneitex force-pushed the refactor-monitoring branch 2 times, most recently from bdbe033 to eafc646 Compare March 1, 2026 15:16
@enneitex

enneitex commented Mar 1, 2026

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 is a significant improvement, refactoring the monitoring setup to be a flexible and integrated part of the Helm chart. By adding kube-prometheus-stack and prometheus-adapter as sub-charts and providing ServiceMonitor resources, it moves away from manual scripts and offers a much cleaner, more maintainable solution. The documentation updates are thorough and clear. I've identified a couple of minor areas for improvement in the ServiceMonitor selectors to make them more specific, but overall this is excellent work.

@enneitex
enneitex marked this pull request as ready for review March 1, 2026 15:24
@enneitex enneitex changed the title [WIP] feat(helm) add monitoring conf as a sub chart feat(helm) add monitoring conf as a sub chart Mar 1, 2026

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

Hi, Thanks for the PR! This is really solid and useful one. Could you confirm the observability/dashboard is still working under this method?
Meanwhile, I have made some concern and suggestions, please lemme know if you have any questions.

Comment thread helm/values.yaml Resolved
Comment thread helm/values.yaml Resolved
@ruizhang0101

Copy link
Copy Markdown
Collaborator

@brokedba Hi, Could you also take a look at this PR since it changes the deployment in aks/gke?

@brokedba

brokedba commented Mar 4, 2026

Copy link
Copy Markdown
Contributor

@ruizhang0101 @enneitex

I checked the PR scope and this doesn't impact the deployments I pushed to the project, as I didn't contribute the AKS/GKE tutorials, so I can't speak to their implementation.
That said, all my terraform contributions (EKS/Nebius/CoreWeave) already use helm_release resources for kube-prometheus-stack deployment along with servicemonitor, and dashboard loading. So they're unaffected by removing observability/install.sh.

The chart-based approach is welcome , as long as the prometheus/monitoring block defaults to disabled as some teams already have their own opinionated observability deployed in the cluster.

For reference, here's how I managed the monitoring part when Prometheus/grafana was not yet handled by the helm chart:

https://github.com/CloudThrill/vllm-production-stack-terraform/blob/5bb9e315324fdd6ea0b003f9540a9a908a482293/eks/vllm-production-stack.tf#L133-L186

@brokedba

brokedba commented Mar 4, 2026

Copy link
Copy Markdown
Contributor

@enneitex Also make sure your implementation supports adding servicemonitor for existing/external Prometheus stack.
See issue👉🏻#606

@enneitex

enneitex commented Mar 4, 2026

Copy link
Copy Markdown
Contributor Author

@enneitex Also make sure your implementation supports adding servicemonitor for existing/external Prometheus stack. See issue👉🏻#606

It is the case. set routerSpec.serviceMonitor.enabled=true and servingEngineSpec.serviceMonitor.enabled=true and it will only create two serviceMonitor that will be picked up by any monitoring stack. It works with prometheus operator, victoriaMetrics, anything that watches for serviceMonitor

@enneitex
enneitex force-pushed the refactor-monitoring branch 3 times, most recently from a24d607 to b48a04c Compare March 5, 2026 17:48
@enneitex
enneitex requested a review from ruizhang0101 March 5, 2026 18:02
@enneitex
enneitex force-pushed the refactor-monitoring branch from e401103 to d9fd61e Compare March 5, 2026 18:24
@enneitex

enneitex commented Mar 5, 2026

Copy link
Copy Markdown
Contributor Author

Hey @ruizhang0101 Ci is green, this is ready for another review !

ruizhang0101
ruizhang0101 previously approved these changes Mar 12, 2026

@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 :))) Thanks for the contribution!

@ruizhang0101

Copy link
Copy Markdown
Collaborator

Hi, could you fix the DCO issue, it should be related to some of the commit are not signed.

@enneitex
enneitex force-pushed the refactor-monitoring branch 3 times, most recently from 8e9eee3 to b9a92ef Compare March 17, 2026 17:34
@enneitex

Copy link
Copy Markdown
Contributor Author

Hey, done :)

Comment thread observability/README.md Resolved
@enneitex
enneitex force-pushed the refactor-monitoring branch from b9a92ef to 3565def Compare March 17, 2026 20:09

@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 07b4d06 into vllm-project:main Mar 19, 2026
20 of 22 checks passed
enneitex added a commit to enneitex/production-stack that referenced this pull request Mar 19, 2026
@enneitex

Copy link
Copy Markdown
Contributor Author

thanks for your help and your time reviewing this PR @ruizhang0101 !
I opened #886 as a follow-up

ikaadil pushed a commit to ikaadil/production-stack that referenced this pull request May 2, 2026
Signed-off-by: enneitex <[email protected]>
Co-authored-by: Rui Zhang <[email protected]>
Signed-off-by: Ifta Khairul Alam Adil <[email protected]>
ruizhang0101 added a commit that referenced this pull request Jun 19, 2026
…chart (#965)

* docs: update KEDA autoscaling guide to use integrated monitoring sub-chart

Since v0.1.11 (PR #860), monitoring (kube-prometheus-stack, prometheus-adapter)
is available as an optional sub-chart dependency. The separate observability
install script is no longer needed.

Changes:
- Replace 'cd observability && bash install.sh' with values.yaml configuration
- Update Prometheus service addresses to match sub-chart naming
- Add note about using existing external Prometheus stacks
- Update version requirement to v0.1.11+
- Update cleanup section to reflect new approach

Signed-off-by: Ahmad Salah <[email protected]>

* docs: address review feedback on KEDA tutorial

- Remove premature verification block from Step 1 (Prometheus is not
  deployed until helm install in Step 2)
- Replace <release-name> placeholder with 'vllm' for copy-paste-able examples
- Remove prometheus-adapter from examples (not required for KEDA, which
  queries Prometheus directly via its built-in scaler)
- Add note explaining when prometheus-adapter is actually needed

Signed-off-by: Ahmad Salah <[email protected]>

---------

Signed-off-by: Ahmad Salah <[email protected]>
Co-authored-by: Rui Zhang <[email protected]>
samhoss93 added a commit to samhoss93/production-stack that referenced this pull request Jun 24, 2026
…ction

The LMCache dashboard's six fields were documented in the old
observability/README.md, which is now deprecated and points readers to
helm/README.md#observability for this content. That content never
made it over during the helm chart monitoring refactor (vllm-project#860), even
though the dashboard itself is still shipped and auto-provisioned via
helm/templates/dashboards.yaml.

Signed-off-by: Sam <[email protected]>
ruizhang0101 added a commit that referenced this pull request Jun 25, 2026
…ction (#982)

The LMCache dashboard's six fields were documented in the old
observability/README.md, which is now deprecated and points readers to
helm/README.md#observability for this content. That content never
made it over during the helm chart monitoring refactor (#860), even
though the dashboard itself is still shipped and auto-provisioned via
helm/templates/dashboards.yaml.

Signed-off-by: Sam <[email protected]>
Co-authored-by: Rui Zhang <[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.

3 participants