Skip to content

feat: add serviceDiscoveryRole role to ServiceMonitor#7982

Merged
simonpasquier merged 1 commit intoprometheus-operator:mainfrom
simonpasquier:add-endpoint-service-role-to-smon
Oct 6, 2025
Merged

feat: add serviceDiscoveryRole role to ServiceMonitor#7982
simonpasquier merged 1 commit intoprometheus-operator:mainfrom
simonpasquier:add-endpoint-service-role-to-smon

Conversation

@simonpasquier
Copy link
Contributor

@simonpasquier simonpasquier commented Oct 6, 2025

Description

This commit introduces a new field to ServiceMonitor which allows to choose between Endpoints and EndpointSlice role for service discovery. It allows migrating away from Endpoints (which is deprecated) in a more granular way (in case the Prometheus service account needs to be granted additional permissions).

Type of change

What type of changes does your code introduce to the Prometheus operator? Put an x in the box that apply.

  • CHANGE (fix or feature that would cause existing functionality to not work as expected)
  • FEATURE (non-breaking change which adds functionality)
  • BUGFIX (non-breaking change which fixes an issue)
  • ENHANCEMENT (non-breaking change which improves existing functionality)
  • NONE (if none of the other choices apply. Example, tooling, build system, CI, docs, etc.)

Verification

Please check the Prometheus-Operator testing guidelines for recommendations about automated tests.

Changelog entry

Please put a one-line changelog entry below. This will be copied to the changelog file during the release process.


@simonpasquier simonpasquier requested a review from a team as a code owner October 6, 2025 09:29
@simonpasquier simonpasquier requested a review from slashpai October 6, 2025 09:29
@simonpasquier simonpasquier force-pushed the add-endpoint-service-role-to-smon branch from 9c1a146 to 81c333e Compare October 6, 2025 09:31
This commit introduces a new field to ServiceMonitor which allows to
choose between Endpoints and EndpointSlice role for service discovery.
It allows migrating away from Endpoints (which is deprecated) in a more
granular way (in case the Prometheus service account needs to be granted
additional permissions).

Signed-off-by: Simon Pasquier <spasquie@redhat.com>
@simonpasquier simonpasquier force-pushed the add-endpoint-service-role-to-smon branch from 81c333e to 9409da5 Compare October 6, 2025 09:49
@simonpasquier simonpasquier merged commit 27af941 into prometheus-operator:main Oct 6, 2025
29 of 30 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants