PrometheusOperatorRejectedResources alert due to token in secret compliance-operator-dockercfg not found

Solution Verified - Updated -

Issue

  • PrometheusOperatorRejectedResources alert is seen after upgrading to version 1.5.1 of the Compliance Operator.
  • Error-logs in the Prometheus Operator about failing to authorization the OpenShift Compliance ServiceMonitor due to an incorrect Secret:

    $ oc logs -c prometheus-operator prometheus-operator-xxxxx-xxxxx -n openshift-monitoring | grep "openshift-compliance"
    2024-09-03T07:48:12.069123855+07:00 level=warn ts=2024-09-03T00:48:12.069075952Z caller=resource_selector.go:174 component=prometheusoperator msg="skipping servicemonitor" error="failed to get authorization token of type Bearer: failed to get token from secret: key \"token\" in secret \"compliance-operator-dockercfg-hpx5s\" not found" servicemonitor=openshift-compliance/metrics namespace=openshift-monitoring prometheus=k8s
    

Environment

  • Red Hat OpenShift Container Platform (RHOCP)
    • 4
  • Compliance Operator
    • 1.5.1

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content