Skip to content

Commit 3b6c582

Browse files
committed
Add alert/RiskApplies
1 parent 3948fd3 commit 3b6c582

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed

install/0000_90_cluster-version-operator_02_servicemonitor.yaml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,16 @@ spec:
8383
for: 60m
8484
labels:
8585
severity: warning
86+
- alert: RiskApplies
87+
annotations:
88+
summary: The cluster has been exposed to the conditional update risk for 10 minutes.
89+
description: The conditional update risk {{ "{{ $labels.risk }}" }} applies to the cluster, and the cluster update to a version exposed to the risk is not recommended. For more information refer to 'oc adm upgrade'.
90+
runbook_url: https://github.com/openshift/runbooks/blob/master/alerts/cluster-monitoring-operator/RiskApplies.md
91+
expr: |
92+
max by (namespace, name, risk) (cluster_version_risk_conditions{job="cluster-version-operator", name="version", condition="Applies"} == 1)
93+
for: 10m
94+
labels:
95+
severity: warning
8696
- name: cluster-operators
8797
rules:
8898
- alert: ClusterNotUpgradeable

pkg/cvo/metrics_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -973,7 +973,7 @@ func TestCollectUnknownConditionalUpdates(t *testing.T) {
973973
}
974974
}
975975

976-
func Test_collectConditionalUpdates(t *testing.T) {
976+
func Test_collectConditionalUpdateRisks(t *testing.T) {
977977
type valueWithLabels struct {
978978
value float64
979979
labels map[string]string

0 commit comments

Comments
 (0)