Metric with type Gauge throwing errors with no reason. #2439
Labels
kind/bug
Categorizes issue or PR as related to a bug.
triage/accepted
Indicates an issue or PR is ready to be actively worked on.
What happened:
After adding below metric. I was able to see the metric in Prometheus portal but the kube-state-metrics pod keeps throwing following error:
E0701 21:29:11.117845 1 registry_factory.go:685] "gotk_resource_status" err="[status,conditions]: []: strconv.ParseFloat: parsing \"Unknown\": invalid syntax".
What you expected to happen:
I expect no errors in the logs after adding that configuration
How to reproduce it (as minimally and precisely as possible):
Added the metric showed in the description
Anything else we need to know?:
As I said before the metric works as expected but the logs are overflowing with the error described on "What happened?" section:
I followed this documentation: https://github.com/kubernetes/kube-state-metrics/blob/main/docs/metrics/extend/customresourcestate-metrics.md#example-for-status-conditions-on-kubernetes-controllers
Environment:
kubectl version
): v1.27.7The text was updated successfully, but these errors were encountered: