Skip to content

alert-mgmt-04: management foundation#3

Open
sradco wants to merge 1 commit intoalert-mgmt-03-k8s-relabel-healthfrom
alert-mgmt-04-mgmt-foundation
Open

alert-mgmt-04: management foundation#3
sradco wants to merge 1 commit intoalert-mgmt-03-k8s-relabel-healthfrom
alert-mgmt-04-mgmt-foundation

Conversation

@sradco
Copy link
Owner

@sradco sradco commented Feb 25, 2026

Alert Management API — Part 4/14: management foundation

Summary

  • management.Client struct and IsPlatformAlertRule helper to distinguish platform vs user-defined rules by namespace
  • Typed error hierarchy: NotFoundError, NotAllowedError, ValidationError, ConflictError for consistent HTTP status mapping
  • Alert rule precondition checks: GitOps/operator managed-by guards, delete/update validation for both platform and user-defined rules
  • Label utilities: protected-label detection, severity validation
  • Alert rule ID matching helper for correlating relabeled rules to PrometheusRule entries
  • Comprehensive k8s client mock (testutils/k8s_client_mock.go) implementing all k8s interfaces for unit tests

Dependencies

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

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

@sradco sradco force-pushed the alert-mgmt-03-k8s-relabel-health branch from 92450d6 to 8e35f9b Compare February 25, 2026 22:35
@sradco sradco force-pushed the alert-mgmt-04-mgmt-foundation branch from ba5d29e to ce39e4c Compare February 25, 2026 22:35
@sradco sradco force-pushed the alert-mgmt-03-k8s-relabel-health branch from 8e35f9b to 491b730 Compare February 25, 2026 22:52
@sradco sradco force-pushed the alert-mgmt-04-mgmt-foundation branch 2 times, most recently from ab2a9b9 to b4e36a6 Compare February 25, 2026 23:16
@sradco sradco force-pushed the alert-mgmt-03-k8s-relabel-health branch from 491b730 to 65ec1fa Compare February 25, 2026 23:57
@sradco sradco force-pushed the alert-mgmt-04-mgmt-foundation branch from b4e36a6 to fa0235d Compare February 25, 2026 23:57
@sradco sradco force-pushed the alert-mgmt-03-k8s-relabel-health branch from 65ec1fa to 47f642b Compare February 26, 2026 14:41
@sradco sradco force-pushed the alert-mgmt-04-mgmt-foundation branch from fa0235d to 6b9228e Compare February 26, 2026 14:41
@sradco sradco force-pushed the alert-mgmt-03-k8s-relabel-health branch from 47f642b to 30f53a3 Compare February 26, 2026 14:46
@sradco sradco force-pushed the alert-mgmt-04-mgmt-foundation branch from 6b9228e to d505cc2 Compare February 26, 2026 14:46
@sradco sradco force-pushed the alert-mgmt-03-k8s-relabel-health branch from 30f53a3 to 7947697 Compare February 27, 2026 11:44
@sradco sradco force-pushed the alert-mgmt-04-mgmt-foundation branch from d505cc2 to a714836 Compare February 27, 2026 11:44
@sradco sradco force-pushed the alert-mgmt-03-k8s-relabel-health branch from 7947697 to 8975350 Compare February 27, 2026 11:57
@sradco sradco force-pushed the alert-mgmt-04-mgmt-foundation branch from a714836 to fff2b6b Compare February 27, 2026 11:57
@sradco sradco force-pushed the alert-mgmt-03-k8s-relabel-health branch from 8975350 to 7b95da5 Compare February 27, 2026 11:59
@sradco sradco force-pushed the alert-mgmt-04-mgmt-foundation branch from fff2b6b to d5e9ffc Compare February 27, 2026 11:59
@sradco sradco force-pushed the alert-mgmt-03-k8s-relabel-health branch from 7b95da5 to 36a17c2 Compare February 27, 2026 12:09
@sradco sradco force-pushed the alert-mgmt-04-mgmt-foundation branch from d5e9ffc to 7f9aa14 Compare February 27, 2026 12:09
@sradco sradco force-pushed the alert-mgmt-03-k8s-relabel-health branch from 36a17c2 to 17a0553 Compare February 27, 2026 13:12
@sradco sradco force-pushed the alert-mgmt-04-mgmt-foundation branch from 7f9aa14 to 77ece9a Compare February 27, 2026 13:12
@sradco sradco force-pushed the alert-mgmt-03-k8s-relabel-health branch from 17a0553 to f23cef8 Compare March 2, 2026 09:26
@sradco sradco force-pushed the alert-mgmt-04-mgmt-foundation branch from 77ece9a to 8d28658 Compare March 2, 2026 09:26
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-03-k8s-relabel-health branch from f23cef8 to ba845e4 Compare March 2, 2026 10:04
@sradco sradco force-pushed the alert-mgmt-04-mgmt-foundation branch from 8d28658 to 255a057 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