Skip to content

alert-mgmt-10: classification system#9

Open
sradco wants to merge 1 commit intoalert-mgmt-09-bulk-deletefrom
alert-mgmt-10-classification
Open

alert-mgmt-10: classification system#9
sradco wants to merge 1 commit intoalert-mgmt-09-bulk-deletefrom
alert-mgmt-10-classification

Conversation

@sradco
Copy link
Owner

@sradco sradco commented Feb 25, 2026

Alert Management API — Part 10/14: classification system

Summary

  • Alert rule classification: component and layer assignment via ConfigMap-based override keys
  • UpdateAlertRuleClassification and BulkUpdateAlertRuleClassification management methods
  • Alert component matcher engine (pkg/alertcomponent): label-based matching with string and regex value matchers for automatic component/layer derivation
  • Classification validation (pkg/classification): layer, component, and PromQL label name validation
  • AlertRuleClassificationPatch router type with explicit Set flags for distinguishing null vs absent fields
  • ConfigMap-based classification override storage (alert_classification_configmap.go)
  • Override namespace resolution for classification data persistence
  • Extended GetAlerts to enrich alerts with classification data (component, layer, componentFrom, layerFrom)
  • Classification design documentation (docs/alert-rule-classification.md)
  • Unit tests for classification update, patch parsing, and alert enrichment

Dependencies

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

  1. alert-mgmt-01: k8s foundation + health stub skeleton
    2–9. Pending — alert queries, relabel/health, management foundation, endpoints, create, delete
  2. → This PR — classification system
    11–14. Pending — platform update, bulk update, docs/CI/e2e, single-rule API

@sradco sradco force-pushed the alert-mgmt-09-bulk-delete branch from 92b6c8d to fe91290 Compare February 25, 2026 22:35
@sradco sradco force-pushed the alert-mgmt-10-classification branch from 5687e5a to 905a71e Compare February 25, 2026 22:35
@sradco sradco force-pushed the alert-mgmt-09-bulk-delete branch from fe91290 to 6e311b5 Compare February 25, 2026 22:52
@sradco sradco force-pushed the alert-mgmt-10-classification branch from 905a71e to 3c1c593 Compare February 25, 2026 22:52
@sradco sradco force-pushed the alert-mgmt-09-bulk-delete branch from 6e311b5 to 8f12523 Compare February 25, 2026 23:17
@sradco sradco force-pushed the alert-mgmt-10-classification branch from 3c1c593 to f6fca74 Compare February 25, 2026 23:17
@sradco sradco force-pushed the alert-mgmt-09-bulk-delete branch from 8f12523 to 907100e Compare February 25, 2026 23:34
@sradco sradco force-pushed the alert-mgmt-10-classification branch from f6fca74 to f3791bc Compare February 25, 2026 23:34
@sradco sradco force-pushed the alert-mgmt-09-bulk-delete branch from 907100e to d3cf52e Compare February 25, 2026 23:47
@sradco sradco force-pushed the alert-mgmt-10-classification branch from f3791bc to a1e95a7 Compare February 25, 2026 23:47
@sradco sradco force-pushed the alert-mgmt-09-bulk-delete branch from d3cf52e to b755e09 Compare February 25, 2026 23:57
@sradco sradco force-pushed the alert-mgmt-10-classification branch from a1e95a7 to 0414d19 Compare February 25, 2026 23:57
@sradco sradco force-pushed the alert-mgmt-09-bulk-delete branch from b755e09 to f0d12c2 Compare February 26, 2026 14:42
@sradco sradco force-pushed the alert-mgmt-10-classification branch from 0414d19 to 4fd603f Compare February 26, 2026 14:42
@sradco sradco force-pushed the alert-mgmt-09-bulk-delete branch from f0d12c2 to ab71e87 Compare February 26, 2026 14:47
@sradco sradco force-pushed the alert-mgmt-10-classification branch from 4fd603f to d6e0660 Compare February 26, 2026 14:47
@sradco sradco force-pushed the alert-mgmt-09-bulk-delete branch from ab71e87 to cafef17 Compare February 27, 2026 11:44
@sradco sradco force-pushed the alert-mgmt-10-classification branch 2 times, most recently from 5100bbf to 6bff20b Compare February 27, 2026 11:50
@sradco sradco force-pushed the alert-mgmt-09-bulk-delete branch from cafef17 to 9c4db86 Compare February 27, 2026 11:57
@sradco sradco force-pushed the alert-mgmt-10-classification branch from 6bff20b to 4e88c65 Compare February 27, 2026 11:57
@sradco sradco force-pushed the alert-mgmt-09-bulk-delete branch from 9c4db86 to 9fe1dda Compare February 27, 2026 11:59
@sradco sradco force-pushed the alert-mgmt-10-classification branch from 4e88c65 to d9dbf2b Compare February 27, 2026 11:59
@sradco sradco force-pushed the alert-mgmt-09-bulk-delete branch from 9fe1dda to 9e51c16 Compare February 27, 2026 12:10
@sradco sradco force-pushed the alert-mgmt-10-classification branch 2 times, most recently from e87f912 to 818594d Compare February 27, 2026 12:29
@sradco sradco force-pushed the alert-mgmt-09-bulk-delete branch from 9e51c16 to 48054c5 Compare February 27, 2026 13:12
@sradco sradco force-pushed the alert-mgmt-10-classification branch from 818594d to 60c2e5c Compare February 27, 2026 13:12
@sradco sradco changed the title alert-mgmt-10: classification update operations alert-mgmt-10: classification system Feb 27, 2026
@sradco sradco force-pushed the alert-mgmt-10-classification branch from 60c2e5c to 5ee5af7 Compare March 1, 2026 19:06
@sradco sradco force-pushed the alert-mgmt-09-bulk-delete branch from 48054c5 to c869ec5 Compare March 1, 2026 21:08
@sradco sradco force-pushed the alert-mgmt-10-classification branch 2 times, most recently from 7ff95cf to ca5937d Compare March 2, 2026 09:26
@sradco sradco force-pushed the alert-mgmt-09-bulk-delete branch from c869ec5 to 6e5bba0 Compare March 2, 2026 09:26
…verrides

Add classification labels (component, layer, component_from, layer_from) to
alert rules via AlertRelabelConfig resources. Routes updates based on rule type
and management status: direct to AlertingRule CR for unmanaged platform rules,
ARC for operator-managed rules, and direct to PrometheusRule for unmanaged
user-defined rules. GitOps-managed rules are blocked from all modifications.

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-09-bulk-delete branch from 6e5bba0 to 7fddfa9 Compare March 2, 2026 10:04
@sradco sradco force-pushed the alert-mgmt-10-classification branch from ca5937d to e2b7208 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