Skip to content

Conversation

vitanovs
Copy link
Member

@vitanovs vitanovs commented Aug 6, 2025

How to categorize this PR?

/area auto-scaling
/kind enhancement

What this PR does / why we need it:

This PR introduces an additional ServiceMonitor and Service records for the vpa-updater, allowing the Prometheus operator deployment to scrape the component [vpa-updater] metrics.

Following the local setup guide, the following metric entries should be available:

vpa-updater-metrics

Note: The above screenshot showcases a set of the available metrics as an example of a successful scraping iteration.

Which issue(s) this PR fixes:

Fixes #12676

Release note:

gardenlet now deploys a `ServiceMonitor` resource for the `vpa-updater`. With this, the `vpa-updater` metrics are scraped by prometheus.

Copy link
Contributor

gardener-prow bot commented Aug 6, 2025

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

@gardener-prow gardener-prow bot added do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. area/auto-scaling Auto-scaling (CA/HPA/VPA/HVPA, predominantly control plane, but also otherwise) related kind/enhancement Enhancement, improvement, extension cla: yes Indicates the PR's author has signed the cla-assistant.io CLA. labels Aug 6, 2025
@gardener-prow gardener-prow bot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Aug 6, 2025
@vitanovs vitanovs marked this pull request as ready for review August 6, 2025 07:16
@gardener-prow gardener-prow bot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Aug 6, 2025
@gardener-prow gardener-prow bot requested review from marc1404 and rfranzke August 6, 2025 07:16
@vitanovs vitanovs force-pushed the feat/add-vpa-updater-service-monitor branch from 14c697a to 0e58eae Compare August 6, 2025 08:42
@gardener-prow gardener-prow bot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Aug 6, 2025
@Kostov6
Copy link
Contributor

Kostov6 commented Aug 6, 2025

/assign

Copy link
Contributor

@Kostov6 Kostov6 left a comment

Choose a reason for hiding this comment

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

  • Should we add similar test to
    It("should label vpa-admission-controller ServiceMonitor with prometheus=shoot",func()
    in the following Context?
Context("when deploying ServiceMonitors", func() {
  • other suggestion is code structural nit

This commit introduces a ServiceMonitor resource to the VPA updater
in order to scrape the component metrics by Prometheus.

Also:
- As a requirement, a new Service resource is created to enable the
  ServiceMonitor referrence with the VPA updater.
… expected resources

This commit adds the new vpa-updater ServiceMonitor and Service to the
expected resources within the vpa unit tests.
@vitanovs vitanovs force-pushed the feat/add-vpa-updater-service-monitor branch from 0e58eae to 5783f15 Compare August 6, 2025 12:49
…rent cluster types

This commit instruments the utility functions that create testing
resources to use switch and separate the different cluster types
in dedicated cases.
@vitanovs vitanovs force-pushed the feat/add-vpa-updater-service-monitor branch from 4eb51ea to a35364d Compare August 6, 2025 14:09
@vitanovs vitanovs requested a review from Kostov6 August 6, 2025 14:40
Copy link
Contributor

@Kostov6 Kostov6 left a comment

Choose a reason for hiding this comment

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

/lgtm

@gardener-prow gardener-prow bot added the lgtm Indicates that a PR is ready to be merged. label Aug 7, 2025
Copy link
Contributor

gardener-prow bot commented Aug 7, 2025

LGTM label has been added.

Git tree hash: 7e3c460272722724a892aa82c95c565fe4784414

Copy link
Contributor

@plkokanov plkokanov left a comment

Choose a reason for hiding this comment

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

📈
/lgtm
/approve

Copy link
Contributor

gardener-prow bot commented Aug 8, 2025

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: plkokanov

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@gardener-prow gardener-prow bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Aug 8, 2025
@gardener-prow gardener-prow bot merged commit 49eca3e into gardener:master Aug 8, 2025
19 checks passed
Duciwuci pushed a commit to stackitcloud/gardener that referenced this pull request Sep 1, 2025
…ping (gardener#12677)

* feat(vpa/updater): add `ServiceMonitor` to `vpa-updater`

This commit introduces a ServiceMonitor resource to the VPA updater
in order to scrape the component metrics by Prometheus.

Also:
- As a requirement, a new Service resource is created to enable the
  ServiceMonitor referrence with the VPA updater.

* feat(vpa/updater/test): include `ServiceMonitor` and `Service` to the expected resources

This commit adds the new vpa-updater ServiceMonitor and Service to the
expected resources within the vpa unit tests.

* feat(vpa/updater/test): add tests to check if `ServiceMonitor` is labeled correctly

* chore(vpa/updater/test): use `switch` when creating objects for different cluster types

This commit instruments the utility functions that create testing
resources to use switch and separate the different cluster types
in dedicated cases.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. area/auto-scaling Auto-scaling (CA/HPA/VPA/HVPA, predominantly control plane, but also otherwise) related cla: yes Indicates the PR's author has signed the cla-assistant.io CLA. kind/enhancement Enhancement, improvement, extension lgtm Indicates that a PR is ready to be merged. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Instrument metrics scrape from the vpa-updater
3 participants