Skip to content

[kube-prometheus-stack] add kubeScheduler serviceMonitor additionalPath#6718

Open
firasmosbehi wants to merge 1 commit into
prometheus-community:mainfrom
firasmosbehi:codex/6334-kps-kubescheduler-additional-path
Open

[kube-prometheus-stack] add kubeScheduler serviceMonitor additionalPath#6718
firasmosbehi wants to merge 1 commit into
prometheus-community:mainfrom
firasmosbehi:codex/6334-kps-kubescheduler-additional-path

Conversation

@firasmosbehi

Copy link
Copy Markdown
Contributor

Summary

This PR adds support for an additional kube-scheduler ServiceMonitor path in kube-prometheus-stack, addressing #6334.

Problem

The kube-scheduler ServiceMonitor currently renders a single endpoint scrape. Users who need metrics from additional scheduler paths (for example /metrics/resources) cannot configure this without patching manifests externally.

Root cause

templates/exporters/kube-scheduler/servicemonitor.yaml only emits one endpoint and no value exists to configure a second path.

Fix

  • Added kubeScheduler.serviceMonitor.additionalPath (default "") to values.
  • Updated kube-scheduler ServiceMonitor template to render a second endpoint when additionalPath is set.
  • Reused the same scrape settings (port, interval, auth, TLS, relabelings) for the extra endpoint and set only path differently.
  • Bumped chart version from 82.9.0 to 82.9.1.

Validation

  • helm lint charts/kube-prometheus-stack
  • helm template test charts/kube-prometheus-stack --set kubeScheduler.serviceMonitor.additionalPath=/metrics/resources
  • Verified rendered kube-scheduler ServiceMonitor includes an additional endpoint with path: /metrics/resources.

Compatibility

No behavior change by default since additionalPath is empty unless explicitly configured.

Signed-off-by: Firas Mosbehi <firas.mosbehi@insat.ucar.tn>
@firasmosbehi firasmosbehi changed the title [codex] [kube-prometheus-stack] add kubeScheduler serviceMonitor additionalPath [kube-prometheus-stack] add kubeScheduler serviceMonitor additionalPath Mar 6, 2026
@firasmosbehi firasmosbehi changed the title [kube-prometheus-stack] add kubeScheduler serviceMonitor additionalPath [codex] [kube-prometheus-stack] add kubeScheduler serviceMonitor additionalPath Mar 6, 2026
@firasmosbehi firasmosbehi marked this pull request as ready for review March 6, 2026 09:44
@firasmosbehi firasmosbehi changed the title [codex] [kube-prometheus-stack] add kubeScheduler serviceMonitor additionalPath [kube-prometheus-stack] add kubeScheduler serviceMonitor additionalPath Mar 6, 2026

@jkroepke jkroepke left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Please make it more explcit to scrape metrics/resources as additional feature, disabled by default.

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