Skip to content

Commit 5decfac

Browse files
author
Tyler Slaton
committed
fix(prometheus): add summary and description for prometheus alerts
Signed-off-by: Tyler Slaton <[email protected]>
1 parent 404aa2c commit 5decfac

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

Diff for: deploy/chart/templates/0000_90_olm_01-prometheus-rule.yaml

+6
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@ spec:
1818
severity: warning
1919
namespace: "{{ "{{ $labels.namespace }}" }}"
2020
annotations:
21+
summary: CSV failed for over 2 minutes
22+
description: Occurs whenever a CSV has been failing for more than 2 minutes
2123
message: Failed to install Operator {{ printf "{{ $labels.name }}" }} version {{ printf "{{ $labels.version }}" }}. Reason-{{ printf "{{ $labels.reason }}" }}
2224
- alert: CsvAbnormalOver30Min
2325
expr: csv_abnormal{phase=~"(^Replacing$|^Pending$|^Deleting$|^Unknown$)"}
@@ -26,6 +28,8 @@ spec:
2628
severity: warning
2729
namespace: "{{ "{{ $labels.namespace }}" }}"
2830
annotations:
31+
summary: CSV abnormal for over 30 minutes
32+
description: Occurs whenever a CSV is abnormal for more than 30 minutes
2933
message: Failed to install Operator {{ printf "{{ $labels.name }}" }} version {{ printf "{{ $labels.version }}" }}. Phase-{{ printf "{{ $labels.phase }}" }} Reason-{{ printf "{{ $labels.reason }}" }}
3034
- name: olm.installplan.rules
3135
rules:
@@ -34,5 +38,7 @@ spec:
3438
labels:
3539
severity: warning
3640
annotations:
41+
summary: API returned a warning when modifying an operator
42+
description: Occurs whenever the API server returns a warning when attempting to modify an operator.
3743
message: The API server returned a warning during installation or upgrade of an operator. An Event with reason "AppliedWithWarnings" has been created with complete details, including a reference to the InstallPlan step that generated the warning.
3844
{{ end }}

Diff for: pkg/controller/operators/catalog/testdata/prometheusrule.cr.yaml

+2
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ spec:
1111
rules:
1212
- alert: SeriousAlert
1313
annotations:
14+
summary: Serious Alert!
15+
description: This is a very serious alert!
1416
message: A serious alert!
1517
expr: alert_status{prioirity="Serious"}
1618
labels:

0 commit comments

Comments
 (0)