Skip to content

feat: add new NoSelectedResources reason#8124

Merged
simonpasquier merged 1 commit intoprometheus-operator:mainfrom
simonpasquier:no-resources-selected-condition
Dec 2, 2025
Merged

feat: add new NoSelectedResources reason#8124
simonpasquier merged 1 commit intoprometheus-operator:mainfrom
simonpasquier:no-resources-selected-condition

Conversation

@simonpasquier
Copy link
Contributor

@simonpasquier simonpasquier commented Nov 28, 2025

Description

This commit introduces the NoSelectedResources reason for the Reconciled condition when a workload object selects no resources (valid or invalid). It should make it easier to detect when resource selectors are null or match no resource.

The Alertmanager resource is the exception because the configuration may be provided only via a reference to a Secret key.

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 November 28, 2025 14:55
@simonpasquier simonpasquier force-pushed the no-resources-selected-condition branch 3 times, most recently from 55ba582 to 9d3becb Compare December 1, 2025 09:27
This commit introduces the `NoSelectedResources` reason for the
`Reconciled` condition when a workload object selects no resources
(valid or invalid). It should make it easier to detect when resource
selectors are null or match no resource.

The `Alertmanager` resource is the exception because the configuration
may be provided only via a reference to a Secret key.

Signed-off-by: Simon Pasquier <spasquie@redhat.com>
@simonpasquier simonpasquier force-pushed the no-resources-selected-condition branch from 9d3becb to 24d828c Compare December 1, 2025 10:44
@simonpasquier simonpasquier merged commit fafb1f5 into prometheus-operator:main Dec 2, 2025
34 of 38 checks passed
@simonpasquier simonpasquier deleted the no-resources-selected-condition branch December 2, 2025 14:38
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