Skip to content

Commit b0f55b9

Browse files
committed
bindata/assets/alerts/api-usage: Include removed_release in APIRemovedInNext*ReleaseInUse labels
There may be version skew around updates, where an alert gets bumped to consider 1.26 "the next release" while other cluster components are still running 1.25, or vice versa. This change makes it a bit easier to understand those skew issues by explicitly including in the alert description (and Telemetry-uploaded alert labels) the removed_release value we're complaining about.
1 parent 71cf3b4 commit b0f55b9

File tree

1 file changed

+12
-5
lines changed

1 file changed

+12
-5
lines changed

bindata/assets/alerts/api-usage.yaml

+12-5
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,14 @@ spec:
1313
description: >-
1414
Deprecated API that will be removed in the next version is being used. Removing the workload that is using
1515
the {{ $labels.group }}.{{ $labels.version }}/{{ $labels.resource }} API might be necessary for
16-
a successful upgrade to the next cluster version.
16+
a successful upgrade to the next cluster version with Kubernetes {{ $labels.removed_release }}.
1717
Refer to `oc get apirequestcounts {{ $labels.resource }}.{{ $labels.version }}.{{ $labels.group }} -o yaml` to identify the workload.
1818
expr: |
19-
group(apiserver_requested_deprecated_apis{removed_release="1.26"}) by (group,version,resource) and (sum by(group,version,resource) (rate(apiserver_request_total{system_client!="kube-controller-manager",system_client!="cluster-policy-controller"}[4h]))) > 0
19+
group by (group,version,resource,removed_release) (apiserver_requested_deprecated_apis{removed_release="1.26"})
20+
* on (group,version,resource) group_left ()
21+
sum by (group,version,resource) (
22+
rate(apiserver_request_total{system_client!="kube-controller-manager",system_client!="cluster-policy-controller"}[4h])
23+
) > 0
2024
for: 1h
2125
labels:
2226
namespace: openshift-kube-apiserver
@@ -27,11 +31,14 @@ spec:
2731
description: >-
2832
Deprecated API that will be removed in the next EUS version is being used. Removing the workload that is using
2933
the {{ $labels.group }}.{{ $labels.version }}/{{ $labels.resource }} API might be necessary for
30-
a successful upgrade to the next EUS cluster version.
34+
a successful upgrade to the next EUS cluster version with Kubernetes {{ $labels.removed_release }}.
3135
Refer to `oc get apirequestcounts {{ $labels.resource }}.{{ $labels.version }}.{{ $labels.group }} -o yaml` to identify the workload.
3236
expr: |
33-
group(apiserver_requested_deprecated_apis{removed_release=~"1\\.2[67]"}) by (group,version,resource) and (sum by(group,version,resource) (rate(apiserver_request_total{system_client!="kube-controller-manager",system_client!="cluster-policy-controller"}[4h]))) > 0
34-
37+
group by (group,version,resource,removed_release) (apiserver_requested_deprecated_apis{removed_release=~"1[.]2[67]"})
38+
* on (group,version,resource) group_left ()
39+
sum by (group,version,resource) (
40+
rate(apiserver_request_total{system_client!="kube-controller-manager",system_client!="cluster-policy-controller"}[4h])
41+
) > 0
3542
for: 1h
3643
labels:
3744
namespace: openshift-kube-apiserver

0 commit comments

Comments
 (0)