Description of problem: CMO ships 2 recording rules (instance:etcd_object_counts:sum and cluster:usage:resources:sum) which use the etcd_object_counts metric which is deprecated since Kube v1.21 [1]. [1] https://github.com/kubernetes/kubernetes/blob/master/CHANGELOG/CHANGELOG-1.21.md Version-Release number of selected component (if applicable): 4.9 How reproducible: Always Steps to Reproduce: 1. Check the definition of instance:etcd_object_counts:sum and cluster:usage:resources:sum Actual results: They use etcd_object_counts. Expected results: They don't use deprecated metrics. Additional info: etcd_object_counts is replaced by apiserver_storage_objects which has the same labels and semantics.
tested with 4.9.0-0.nightly-2021-08-26-164418, etcd_object_counts is replaced by apiserver_storage_objects # oc -n openshift-monitoring get cm prometheus-k8s-rulefiles-0 -oyaml | grep -E "instance:etcd_object_counts:sum|cluster:usage:resources:sum" -C1 - expr: sum by (instance) (apiserver_storage_objects) record: instance:etcd_object_counts:sum - expr: topk(500, max by(resource) (apiserver_storage_objects)) record: cluster:usage:resources:sum
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory (Moderate: OpenShift Container Platform 4.9.0 bug fix and security update), and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHSA-2021:3759