Skip to content

alert-mgmt-02: k8s: add alert listing/query and filter primitives#1

Open
sradco wants to merge 1 commit intoalert-mgmt-01-k8s-foundationfrom
alert-mgmt-02-k8s-alert-queries
Open

alert-mgmt-02: k8s: add alert listing/query and filter primitives#1
sradco wants to merge 1 commit intoalert-mgmt-01-k8s-foundationfrom
alert-mgmt-02-k8s-alert-queries

Conversation

@sradco
Copy link
Owner

@sradco sradco commented Feb 25, 2026

Alert Management API — Part 2/14: alert listing, query & filter primitives

Summary

  • PrometheusAlerts implementation: fetches alerts and rule groups from both platform and user-workload Prometheus/Thanos endpoints
  • Namespace-scoped Thanos tenancy queries for user-workload rules
  • State-based alert filtering (firing, pending, silenced)
  • Exact-match label filtering (key=value) with special handling for namespace (used for tenancy selection, not rule filtering)
  • Prometheus-style label matchers (match[] semantics) supporting full selectors and selector bodies
  • TLS transport with service CA for in-cluster communication
  • Unit tests for label matcher compilation and matching semantics

Dependencies

This PR is part of a stacked series. Please review in order.

  1. alert-mgmt-01: k8s foundation + health stub skeleton
  2. → This PR — alert listing, query & filter primitives
    3–14. Pending — relabel config, alerting health, management foundation, CRUD endpoints, classification, bulk update, docs/CI/e2e, single-rule API

@sradco sradco force-pushed the alert-mgmt-01-k8s-foundation branch from e38bbf8 to fb22c01 Compare February 25, 2026 22:35
@sradco sradco force-pushed the alert-mgmt-02-k8s-alert-queries branch from af91c3f to c4c75e8 Compare February 25, 2026 22:35
@sradco sradco force-pushed the alert-mgmt-01-k8s-foundation branch from fb22c01 to 10099ad Compare February 25, 2026 22:52
@sradco sradco force-pushed the alert-mgmt-02-k8s-alert-queries branch from c4c75e8 to a980ad1 Compare February 25, 2026 22:52
@sradco sradco force-pushed the alert-mgmt-01-k8s-foundation branch from 10099ad to 3c4424e Compare February 25, 2026 23:57
@sradco sradco force-pushed the alert-mgmt-02-k8s-alert-queries branch 2 times, most recently from a8171e2 to 648db25 Compare February 26, 2026 14:41
@sradco sradco force-pushed the alert-mgmt-01-k8s-foundation branch 2 times, most recently from 68beae9 to ab9515e Compare February 26, 2026 14:46
@sradco sradco force-pushed the alert-mgmt-02-k8s-alert-queries branch from 648db25 to 8828c5a Compare February 26, 2026 14:46
@sradco sradco force-pushed the alert-mgmt-01-k8s-foundation branch from ab9515e to a82ec2e Compare February 27, 2026 11:57
@sradco sradco force-pushed the alert-mgmt-02-k8s-alert-queries branch from 8828c5a to 446a95a Compare February 27, 2026 11:57
@sradco sradco force-pushed the alert-mgmt-01-k8s-foundation branch from a82ec2e to 0480720 Compare February 27, 2026 11:59
@sradco sradco force-pushed the alert-mgmt-02-k8s-alert-queries branch 2 times, most recently from 12c4d9f to d8acbb4 Compare February 27, 2026 12:09
@sradco sradco force-pushed the alert-mgmt-01-k8s-foundation branch from 0480720 to 1cbfb7d Compare February 27, 2026 13:12
@sradco sradco force-pushed the alert-mgmt-02-k8s-alert-queries branch from d8acbb4 to 314d236 Compare February 27, 2026 13:12
Add PrometheusAlerts implementation with:
- Alert fetching from platform and user-workload Prometheus/Thanos
- Rule group fetching with namespace-scoped Thanos tenancy queries
- State-based filtering (firing, pending, silenced)
- Label-based flat filtering with key=value matching
- TLS transport with service CA for in-cluster communication

Signed-off-by: Shirly Radco <sradco@redhat.com>
Signed-off-by: João Vilaça <jvilaca@redhat.com>
Signed-off-by: Aviv Litman <alitman@redhat.com>
Co-authored-by: AI Assistant <noreply@cursor.com>
@sradco sradco force-pushed the alert-mgmt-01-k8s-foundation branch from 1cbfb7d to 789cbb0 Compare March 2, 2026 10:04
@sradco sradco force-pushed the alert-mgmt-02-k8s-alert-queries branch from 314d236 to d853dd3 Compare March 2, 2026 10:04
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.

1 participant