Description of problem (please be detailed as possible and provide log snippests): ServiceAccount ocs-metrics-exporter tries to get secret for 'prometheus-user' for OBC related alerts, but fails with error below: E0914 13:19:44.481105 1 ceph-block-pool.go:137] Invalid image health for pool ocs-storagecluster-cephblockpool. Must be OK, UNKNOWN, WARNING or ERROR E0914 13:19:44.492203 1 object-bucket.go:165] Secret for prometheus-user not found. secrets "rook-ceph-object-user-ocs-storagecluster-cephobjectstore-prometheus-user" is forbidden: User "system:serviceaccount:openshift-storage:ocs-metrics-exporter" cannot get resource "secrets" in API group "" in the namespace "openshift-storage" W0914 13:19:44.492221 1 object-bucket.go:121] CephObjectStore "ocs-storagecluster-cephobjectstore" in namespace "openshift-storage" was skipped The ServiceAccount does not have the required permission: # kubectl auth can-i get secrets --as=system:serviceaccount:openshift-storage:ocs-metrics-exporter no Version of all relevant components (if applicable): 4.9 Does this issue impact your ability to continue to work with the product (please explain in detail what is the user impact)? Is there any workaround available to the best of your knowledge? Rate from 1 - 5 the complexity of the scenario you performed that caused this bug (1 - very simple, 5 - very complex)? Can this issue reproducible? Yes Can this issue reproduce from the UI? Yes If this is a regression, please provide more details to justify this: Steps to Reproduce: 1. Check logs for pod ocs-metrics-exporter-* 2. 3. Actual results: Expected results: Additional info: BZ https://bugzilla.redhat.com/show_bug.cgi?id=1999952 is open to automate creation of the prometheus-user for OBC alerts
Tested on ODF 4.9.0: # oc get csv -n openshift-storage NAME DISPLAY VERSION REPLACES PHASE mcg-operator.v4.9.0 NooBaa Operator 4.9.0 Succeeded ocs-operator.v4.9.0 OpenShift Container Storage 4.9.0 Succeeded odf-operator.v4.9.0 OpenShift Data Foundation 4.9.0 Succeeded # kubectl auth can-i get secrets --as=system:serviceaccount:openshift-storage:ocs-metrics-exporter yes Moving to VERIFIED