Add component mapping to alerts#8
Add component mapping to alerts#8sradco merged 4 commits intomachadovilaca:add-alert-management-api-basefrom
Conversation
8feaad6 to
20f8b4d
Compare
|
Hi @machadovilaca , @avlitman, @simonpasquier Hi, Please review this PR. |
20f8b4d to
8d7e4c6
Compare
|
I thought that development was supposed to happen in https://github.com/openshift/monitoring-plugin/? |
@simonpasquier these PRs are against the branch used for openshift#657 |
8d7e4c6 to
887f95f
Compare
|
@machadovilaca I updated the PR based on your feedback. Please review. |
As it has been communicated elsewhere, we wont' be able to review a giant PR in openshift/monitoring-plugin. My expectation was that we would review PRs directly in openshift/monitoring-plugin. |
|
@simonpasquier once we will finish adding all the features to the branch I will split it to logical commits. |
|
/hold |
bddde87 to
9ac6b3a
Compare
|
/unhold |
|
Hi @machadovilaca , @avlitman, Hi, Please review this PR. |
8cad9bf to
8d065c3
Compare
|
Hi, I rebased this PR. Please review @avlitman @machadovilaca |
| Component *string `json:"openshift_io_alert_rule_component,omitempty"` | ||
| ComponentSet bool `json:"-"` |
There was a problem hiding this comment.
whats the difference between nil and ComponentSet false?
There was a problem hiding this comment.
If ComponentSet == false: don’t change anything (leave whatever is stored today).
If ComponentSet == true and Component == nil: clear it (remove the override).
If ComponentSet == true and Component != nil: set it to that string.
Examples:
- No change (field omitted):
{ "classification": { } }
or omit classification entirely. - Clear:
{ "classification": { "openshift_io_alert_rule_component": null } } - Set:
{ "classification": { "openshift_io_alert_rule_component": "network" } }
ba1d756 to
ce4cdbf
Compare
machadovilaca
left a comment
There was a problem hiding this comment.
after fixing the current comments, looks good to me
im just not sure about the double pointers, but we can revisit later
7acd7bc to
954923d
Compare
Document classification endpoints and implement router handlers for single and bulk updates. Signed-off-by: Shirly Radco <sradco@redhat.com> Co-authored-by: Cursor <cursoragent@cursor.com>
Persist classification overrides in a ConfigMap and merge effective values into alert responses. Signed-off-by: Shirly Radco <sradco@redhat.com> Co-authored-by: Cursor <cursoragent@cursor.com>
Add component/layer matching logic used to classify rules and alerts. Signed-off-by: Shirly Radco <sradco@redhat.com> Co-authored-by: Cursor <cursoragent@cursor.com>
Add k8s helpers and alert enrichment needed to compute and expose rule classification defaults. Signed-off-by: Shirly Radco <sradco@redhat.com> Co-authored-by: Cursor <cursoragent@cursor.com>
954923d to
e0e87b1
Compare
e4bdd22
into
machadovilaca:add-alert-management-api-base
Added a mapping of layer(cluster/namespace) and
component to alerts.
Based on openshift/enhancements#1917