Bug 1932165 - variables in DeprecatedAPIInUse alert's annotations.message are not parsed to existing values
Summary: variables in DeprecatedAPIInUse alert's annotations.message are not parsed to...
Keywords:
Status: POST
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: kube-apiserver
Version: 4.8
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: ---
: ---
Assignee: David Eads
QA Contact: Ke Wang
URL:
Whiteboard:
: 1949988 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-02-24 06:05 UTC by Junqi Zhao
Modified: 2021-07-22 18:04 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed:
Target Upstream Version:


Attachments (Terms of Use)
DeprecatedAPIInUse alert detail (103.79 KB, image/png)
2021-02-24 06:05 UTC, Junqi Zhao
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Github openshift cluster-kube-apiserver-operator pull 1055 0 None closed Bug 1932165: variables in DeprecatedAPIInUse alert's annotations.message are not parsed to existing values 2021-05-27 14:48:36 UTC

Description Junqi Zhao 2021-02-24 06:05:33 UTC
Created attachment 1758999 [details]
DeprecatedAPIInUse alert detail

Created attachment 1758999 [details]
DeprecatedAPIInUse alert detail

Description of problem:
in a fresh 4.8 cluster which has been running for 1 hour at least, DeprecatedAPIInUse alert is fired
# oc -n openshift-kube-apiserver get prometheusrules kube-apiserver -oyaml
...
  - name: pre-release-lifecycle
    rules:
    - alert: DeprecatedAPIInUse
      annotations:
        message: Deprecated API that will be removed in the next version is being used. Removing the workload that is using the {{"{{$labels.group}}"}}.{{"{{$labels.version}}"}}/{{"{{$labels.resource}}"}} API might be necessary for a successful upgrade to the next cluster version. Refer to the audit logs to identify the workload.
      expr: |
        group(apiserver_requested_deprecated_apis{removed_release="1.21"}) by (group,version,resource) and (sum by(group,version,resource) (rate(apiserver_request_total[10m]))) > 0
      for: 1h
      labels:
        severity: info


see from the attachment, Message section in Alert details page
******************
Deprecated API that will be removed in the next version is being used. Removing the workload that is using the {{$labels.group}}.{{$labels.version}}/{{$labels.resource}} API might be necessary for a successful upgrade to the next cluster version. Refer to the audit logs to identify the workload.
******************
{{$labels.group}}.{{$labels.version}}/{{$labels.resource}} is not replaced to existing values
it should be
"{{$labels.group}}.{{$labels.version}}/{{$labels.resource}}" for annotations.message in DeprecatedAPIInUse alert

Version-Release number of selected component (if applicable):
4.8.0-0.nightly-2021-02-23-160229

How reproducible:
always

Steps to Reproduce:
1. see from the description
2.
3.

Actual results:


Expected results:


Additional info:

Comment 1 hongyan li 2021-04-09 03:37:14 UTC
*** Bug 1947719 has been marked as a duplicate of this bug. ***

Comment 2 Vadim Rutkovsky 2021-04-15 14:41:41 UTC
*** Bug 1949988 has been marked as a duplicate of this bug. ***

Comment 4 Junqi Zhao 2021-05-25 09:16:21 UTC
no DeprecatedAPIInUse alert now


Note You need to log in before you can comment on or make changes to this bug.