-
Bug
-
Resolution: Unresolved
-
Normal
-
None
-
4.17.0, 4.18.0
-
None
-
Quality / Stability / Reliability
-
False
-
-
None
-
Moderate
-
None
-
None
-
None
-
None
-
None
-
None
-
None
-
None
-
None
-
None
-
None
-
None
Description of problem:
cluster_infrastructure_provider metrics is exposed by openshift-kube-apiserver-operator project.
$ token=`oc create token prometheus-k8s -n openshift-monitoring`
$ oc -n openshift-monitoring exec -c prometheus prometheus-k8s-0 -- curl -k -H "Authorization: Bearer $token" 'https://thanos-querier.openshift-monitoring.svc:9091/api/v1/query?' --data-urlencode 'query=cluster_infrastructure_provider' | jq
{
"status": "success",
"data": {
"resultType": "vector",
"result": [
{
"metric": {
"__name__": "cluster_infrastructure_provider",
"container": "kube-apiserver-operator",
"endpoint": "https",
"instance": "10.130.0.20:8443",
"job": "metrics",
"namespace": "openshift-kube-apiserver-operator",
"pod": "kube-apiserver-operator-9c8c88fc4-ktbrg",
"prometheus": "openshift-monitoring/k8s",
"region": "us-east-2",
"service": "metrics",
"type": "AWS"
},
"value": [
1724230916.601,
"1"
]
}
],
"analysis": {}
}
}
dev console, "Observe -> Metrics" tab, select one project not equal to openshift-kube-apiserver-operator, example: default, search cluster_infrastructure_provider in the query-browser input text-area, result is
NamecontainerendpointinstancejobnamespacepodprometheusregionservicetypeValuecluster_infrastructure_providerkube-apiserver-operatorhttps10.130.0.20:8443metricsopenshift-kube-apiserver-operatorkube-apiserver-operator-9c8c88fc4-ktbrgopenshift-monitoring/k8sus-east-2metricsAWS None
click "Run queries" again, will see "No datapoints found.", screen recording: https://drive.google.com/file/d/1SFAiew_wZrjncd23TBGC23gl8vh1jwg5/view?usp=sharing
Version-Release number of selected component (if applicable):
4.17.0-0.nightly-2024-08-19-165854 and 4.18.0-0.nightly-2024-08-19-002129
How reproducible:
always
Steps to Reproduce:
1. see the description
Actual results:
4.17/4.18 dev console, search metrics not belong to the project, would show the result first, query again, then result is No datapoints found
Expected results:
should show "No datapoints found" if the metrics is not owned by the project
Additional info: