Skip to content

COO-1531: feat: expose AlertmanagerConfigMatcherStrategy on MonitoringStack#1092

Open
jan--f wants to merge 1 commit into
rhobs:mainfrom
jan--f:feat/alertmanaer-strategy
Open

COO-1531: feat: expose AlertmanagerConfigMatcherStrategy on MonitoringStack#1092
jan--f wants to merge 1 commit into
rhobs:mainfrom
jan--f:feat/alertmanaer-strategy

Conversation

@jan--f
Copy link
Copy Markdown
Collaborator

@jan--f jan--f commented May 19, 2026

AlertmanagerConfig resources automatically inject a namespace matcher into routes, forcing users to add namespace labels to PrometheusRule alerts. Expose the matcherStrategy field on MonitoringStack.Spec.AlertmanagerConfig with a default of None so routes match all alerts regardless of namespace.

@openshift-ci-robot
Copy link
Copy Markdown
Collaborator

openshift-ci-robot commented May 19, 2026

@jan--f: This pull request references COO-1531 which is a valid jira issue.

Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the bug to target the "5.0.0" version, but no target version was set.

Details

In response to this:

AlertmanagerConfig resources automatically inject a namespace matcher into routes, forcing users to add namespace labels to PrometheusRule alerts. Expose the matcherStrategy field on MonitoringStack.Spec.AlertmanagerConfig with a default of None so routes match all alerts regardless of namespace.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository.

@openshift-ci openshift-ci Bot requested review from machine424 and rexagod May 19, 2026 06:52
@openshift-ci
Copy link
Copy Markdown

openshift-ci Bot commented May 19, 2026

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: jan--f

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 19, 2026

Review Change Stack

Warning

Rate limit exceeded

@jan--f has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 57 minutes and 49 seconds before requesting another review.

You’ve run out of usage credits. Purchase more in the billing tab.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository YAML (base), Organization UI (inherited)

Review profile: CHILL

Plan: Enterprise

Run ID: b4a938fc-77cc-4711-89b0-ce41dee2c598

📥 Commits

Reviewing files that changed from the base of the PR and between d0bde27 and 130cab7.

📒 Files selected for processing (7)
  • bundle/manifests/monitoring.rhobs_monitoringstacks.yaml
  • bundle/manifests/observability-operator.clusterserviceversion.yaml
  • deploy/crds/common/monitoring.rhobs_monitoringstacks.yaml
  • docs/api.md
  • pkg/apis/monitoring/v1alpha1/types.go
  • pkg/controllers/monitoring/monitoring-stack/alertmanager.go
  • pkg/controllers/monitoring/monitoring-stack/alertmanager_test.go
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

…O-1531)

AlertmanagerConfig resources automatically inject a namespace matcher
into routes, forcing users to add namespace labels to PrometheusRule
alerts. Expose the matcherStrategy field on MonitoringStack.Spec.AlertmanagerConfig
with a default of None so routes match all alerts regardless of namespace.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Signed-off-by: Jan Fajerski <jfajersk@redhat.com>
@jan--f jan--f force-pushed the feat/alertmanaer-strategy branch from bdc3562 to 130cab7 Compare May 19, 2026 06:53
@simonpasquier
Copy link
Copy Markdown
Contributor

/cc @jan--f

@openshift-ci
Copy link
Copy Markdown

openshift-ci Bot commented May 19, 2026

@simonpasquier: GitHub didn't allow me to request PR reviews from the following users: jan--f.

Note that only rhobs members and repo collaborators can review this PR, and authors cannot review their own PRs.

Details

In response to this:

/cc @jan--f

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

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.

The upstream struct has an inner type field which offers the possibility to pass additional parameters if required for new strategies:

spec:
  alertmanagerConfigMatcherStrategy:
    type: OnFooBar
    fooBar:
      foo: x
      bar: y

It might be good to follow a similar pattern for MonitoringStack?

spec:
  alertmanager
    configMatcherStrategy:
      type: None

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants