-
Notifications
You must be signed in to change notification settings - Fork 155
cluster-alerts: Add alert rule UnsupportedOrDeprecatedMachineType #3358
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
cluster-alerts: Add alert rule UnsupportedOrDeprecatedMachineType #3358
Conversation
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
@dasionov: The following test failed, say
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. I understand the commands that are listed here. |
hco-e2e-kv-smoke-gcp lane succeeded. |
@hco-bot: Overrode contexts on behalf of hco-bot: ci/prow/hco-e2e-kv-smoke-azure In response to this:
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. |
@dasionov: The following tests failed, say
Full PR test history. Your PR dashboard. 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. I understand the commands that are listed here. |
7e08196
to
871c2da
Compare
/hold, wait for kubevirt/kubevirt#14255 to introduce the metric. |
Pull Request Test Coverage Report for Build 14086128705Details
💛 - Coveralls |
This commit adds the `UnsupportedOrDeprecatedMachineType` alert to detect when a VM is using a deprecated or unsupported machine type. Rule Expression: kubevirt_vm_info * on(machine_type) group_left(deprecated) ( kubevirt_supported_machine_types unless kubevirt_supported_machine_types{deprecated="yes"} ) How It Works: - Filters out machine types that have any `deprecated="yes"` entry. - Joins `kubevirt_vm_info` with the remaining supported types. - Triggers an alert if a VM uses a deprecated or unsupported type. This helps ensure VMs run on supported machine types, preventing potential issues. Signed-off-by: Daniel Sionov <[email protected]>
871c2da
to
a2c3fb6
Compare
|
@@ -59,5 +59,18 @@ func clusterAlerts() []promv1.Rule { | |||
"operator_health_impact": "none", | |||
}, | |||
}, | |||
{ | |||
Alert: "UnsupportedOrDeprecatedMachineType", | |||
Expr: intstr.FromString(`kubevirt_vm_info * on(machine_type) group_left(deprecated) (kubevirt_supported_machine_types unless kubevirt_supported_machine_types{deprecated="yes"})`), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you need to to do count by node
so that the alert will fire once for each node that has this issue.
I would do something like:
count by (node) (kubevirt_vm_info * on(machine_type) group_left(deprecated) (kubevirt_supported_machine_types{deprecated="yes"}))
}, | ||
Labels: map[string]string{ | ||
"severity": "warning", | ||
"operator_health_impact": "none", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Isn't this a blocker for an upgrade? Shouldnt we degrade the operator and set operator_health_impact
to warning
?
PR needs rebase. 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. |
What this PR does / why we need it:
This PR adds the
UnsupportedOrDeprecatedMachineType
alert to detect when a VM is using a deprecated or unsupported machine type.Rule Expression:
How It Works:
deprecated="yes"
entry.kubevirt_vm_info
with the remaining supported types.This helps ensure VMs run on supported machine types, preventing potential issues.
Reviewer Checklist
Jira Ticket:
Release note: