Skip to content

docs: note that the ServiceMonitor needs the metrics Service - #288

Merged
hagaibarel merged 1 commit into
coredns:masterfrom
lbarrosby:docs/servicemonitor-needs-metrics-service
Nov 4, 2026
Merged

hagaibarel merged 1 commit into
coredns:masterfrom
lbarrosby:docs/servicemonitor-needs-metrics-service

Conversation

@lbarrosby

Copy link
Copy Markdown
Contributor

Why is this pull request needed and what does it do?

With the default prometheus.monitor.selector, the ServiceMonitor selects the -metrics Service, which is only rendered when prometheus.service.enabled is true. Enabling just prometheus.monitor.enabled gives a ServiceMonitor that matches nothing, and nothing in the docs says the two are linked.

This documents the dependency in the README parameter table and in values.yaml, and says what the default monitor selector matches. No template change: a custom prometheus.monitor.selector can legitimately point at another Service, so rendering or failing based on prometheus.service.enabled would get in the way there. Happy to switch to auto-rendering the metrics Service instead if you prefer that.

Bumped the chart to 1.50.1. helm lint and helm unittest --strict charts/coredns pass.

Which issues (if any) are related?

Fixes #274

Checklist:

  • I have bumped the chart version according to versioning.
  • I have updated the chart changelog with all the changes that come with this pull request according to changelog.
  • Any new values are backwards compatible and/or have sensible default.
  • I have signed off all my commits as required by DCO.

Changes are automatically published when merged to main. They are not published on branches.

Note on DCO

If the DCO action in the integration test fails, one or more of your commits are not signed off. Please click on the Details link next to the DCO action for instructions on how to resolve this.

With its default selector the ServiceMonitor matches the Service rendered
by prometheus.service.enabled, so enabling only prometheus.monitor.enabled
produces a ServiceMonitor that selects nothing. Say so in the README and
values.yaml, and describe what the default monitor selector matches.

Chart 1.50.1.

Signed-off-by: Lucas Barros <lucasbarros.kam@gmail.com>
@hagaibarel
hagaibarel merged commit 0818ae1 into coredns:master Nov 4, 2026
2 checks passed
@hagaibarel

Copy link
Copy Markdown
Collaborator

Thanks for the PR!

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.

ServiceMonitor can render without its metrics Service when only prometheus.monitor.enabled is enabled

2 participants