Skip to content

Alertmanager: Select AlertmanagerConfig CRs within its own namespace by default#2747

Merged
simonpasquier merged 2 commits intoprometheus-operator:mainfrom
superbrothers:alertmanagerConfigSelector
Oct 8, 2025
Merged

Alertmanager: Select AlertmanagerConfig CRs within its own namespace by default#2747
simonpasquier merged 2 commits intoprometheus-operator:mainfrom
superbrothers:alertmanagerConfigSelector

Conversation

@superbrothers
Copy link
Copy Markdown
Contributor

Description

This PR modifies the Alertmanager CR to automatically select AlertmanagerConfig CRs within its own namespace by default.

Currently, Alertmanager spec.alertmanagerConfigSelector is unspecified by default, which means no AlertmanagerConfigs are selected by default.

On the other hand, Prometheus .spec.serviceMonitorSelector is {} by default, meaning it automatically selects ServiceMonitor CRs within its own namespace by default.

Users are confused by this discrepancy in default configurations between Prometheus CRs and Alertmanager CRs.

Type of change

  • 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.)

Changelog entry

Alertmanager : Select AlertmanagerConfig CRs in its own namespace by default

@superbrothers superbrothers requested a review from a team as a code owner September 26, 2025 02:32
@simonpasquier
Copy link
Copy Markdown
Contributor

Can we introduce a config parameter that would let specify the alertmanagerConfigSelector?

@superbrothers
Copy link
Copy Markdown
Contributor Author

Can we introduce a config parameter that would let specify the alertmanagerConfigSelector?

OK. I'll do it.

@superbrothers
Copy link
Copy Markdown
Contributor Author

done.

Copy link
Copy Markdown
Contributor

@simonpasquier simonpasquier left a comment

Choose a reason for hiding this comment

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

thanks!

@simonpasquier simonpasquier enabled auto-merge (squash) October 8, 2025 12:27
@simonpasquier simonpasquier merged commit 6828741 into prometheus-operator:main Oct 8, 2025
10 of 11 checks passed
@superbrothers superbrothers deleted the alertmanagerConfigSelector branch October 8, 2025 12:43
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