The /metrics endpoint should have an e2e test to validate that it responds with prometheus metrics. The key metrics is console_url. The console operator is not currently reporting console_url on master (4.3).
*** Bug 1766123 has been marked as a duplicate of this bug. ***
The problem here is several layers deep. The wiring code in library-go is no longer usable. Instead, we need to use: k8smetrics "k8s.io/component-base/metrics" "k8s.io/component-base/metrics/legacyregistry" The component-base in kube has shifted away form using a global metrics registry. Fortunately, it is surfaced as a legacyregistry, so we can fix the wiring. PR updated.
Payload 4.3.0-0.nightly-2019-11-13-004353 Checked on ocp 4.3 env with above version, now there is console_url in metrics, and filtering on prometheus ui with "console_url" will have output. $ oc -n openshift-console-operator --config=xxianew.kubeconfig exec console-operator-686c665bf6-txmg7 -- curl -k -H "Authorization: Bearer eyJhbGciOiJSUzI1NiIsImtpZCI6Ijk0STk1N0ZqOXZxc0NnVmp6em9UWUFEZm5vbWpwMW50SlNYQl9CVENNMzQifQ.eyJpc3MiOiJrdWJlcm5ldGVzL3NlcnZpY2VhY2NvdW50Iiwia3ViZXJuZXRlcy5pby9zZXJ2aWNlYWNjb3VudC9uYW1lc3BhY2UiOiJvcGVuc2hpZnQtbW9uaXRvcmluZyIsImt1YmVybmV0ZXMuaW8vc2VydmljZWFjY291bnQvc2VjcmV0Lm5hbWUiOiJwcm9tZXRoZXVzLWs4cy10b2tlbi14bTVqciIsImt1YmVybmV0ZXMuaW8vc2VydmljZWFjY291bnQvc2VydmljZS1hY2NvdW50Lm5hbWUiOiJwcm9tZXRoZXVzLWs4cyIsImt1YmVybmV0ZXMuaW8vc2VydmljZWFjY291bnQvc2VydmljZS1hY2NvdW50LnVpZCI6IjZhMmYwYzIxLTQ0NDAtNDJhYS1hOTA2LTEzZDRjMDQyZjIyNyIsInN1YiI6InN5c3RlbTpzZXJ2aWNlYWNjb3VudDpvcGVuc2hpZnQtbW9uaXRvcmluZzpwcm9tZXRoZXVzLWs4cyJ9.uKiGvLsJ37ZSuODDgbJXVIaE_CMrvvcjHF8TiGD0uAplHpy0AR1xGIyypiyTAz-MezCJyHp7bkZKfPaIjHDZXSj69bXca9YJdHPOpz2H_yHyvghavOVlu0HVG_9u0AAVqukJCXpTUbuinhIHXlgqj1aWvXWNz5jcrF8ZNlWHrFI1p-6zlZU-3OOTShIQdQ2sgDnWb_zmCrw-va6nqUmUG-yQTv_SCEfK-GggIKlyfc8OS0eoITui-kwDMHMhz5l2ZfIsG29SQQKldXSFzj5E9mhatao_I0O_HGl0dJrYeQ1LaV5bt5SuL6zuEluN0q3ONxJzgmVp7fJ-NfeaVQIxew" https://10.128.0.27:8443/metrics | grep console_url % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 12516 0 12516 0 0 92027 0 --:--:-- --:--:-- --:--:-- 92711 # HELP console_url [ALPHA] URL of the console exposed on the cluster # TYPE console_url gauge console_url{url=""} 0 console_url{url="https://console-openshift-console.apps.xxia-1113-43.qe.devcluster.openshift.com"} 1 The bug has been fixed.
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, 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/RHBA-2020:0062