Description of problem:
CCO reports credsremoved mode in metrics when the cluster is actually in the default mode. See https://prow.ci.openshift.org/view/gs/origin-ci-test/pr-logs/pull/openshift_release/47349/rehearse-47349-pull-ci-openshift-cloud-credential-operator-release-4.16-e2e-aws-qe/1744240905512030208 (OCP-31768).
Version-Release number of selected component (if applicable):
4.16
How reproducible:
Always.
Steps to Reproduce:
1. Creates an AWS cluster with CCO in the default mode (ends up in mint) 2. Get the value of the cco_credentials_mode metric
Actual results:
credsremoved
Expected results:
mint
Root cause:
The controller-runtime client used in metrics calculator (https://github.com/openshift/cloud-credential-operator/blob/77a68ad01e75162bfa04097b22f80d305c192439/pkg/operator/metrics/metrics.go#L77) is unable to GET the root credentials Secret (https://github.com/openshift/cloud-credential-operator/blob/77a68ad01e75162bfa04097b22f80d305c192439/pkg/operator/metrics/metrics.go#L184) since it is backed by a cache which only contains target Secrets requested by other operators (https://github.com/openshift/cloud-credential-operator/blob/77a68ad01e75162bfa04097b22f80d305c192439/pkg/cmd/operator/cmd.go#L164-L168).
- blocks
-
OCPBUGS-26510 CCO reports wrong credentials mode in metrics
- Closed
-
OCPBUGS-26512 CCO reports wrong credentials mode in metrics
- Closed
- is cloned by
-
OCPBUGS-26510 CCO reports wrong credentials mode in metrics
- Closed
-
OCPBUGS-26512 CCO reports wrong credentials mode in metrics
- Closed
- links to
-
RHEA-2024:0041 OpenShift Container Platform 4.16.z bug fix update
(1 links to)