-
Notifications
You must be signed in to change notification settings - Fork 2.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Some job metrics are missing if job has no conditions #2443
Comments
/assign @richabanker |
I just tried to reproduce this, so far I am actually able to see the
but yes, I dont see the |
From my perspective the I listed I also found that |
Discussed briefly with @dgrisonnet, the suggestion to emit |
What happened:
Some job metrics (
kube_job_status_failed
,kube_job_complete
,kube_job_failed
) are missing forJob
s without conditions.What you expected to happen:
Metrics are present regardless if conditions exist.
How to reproduce it (as minimally and precisely as possible):
job.yaml
.status
is missing aconditions
objects (before the backoffLimit is reached)kube_job_status_failed
metric is missing (curl localhost:8080/metrics | grep kube_job_status_failed
)Anything else we need to know?:
The reason for this bug is that the labels and values are only set within a for loop (if a condition of type
Failed
exists):kube-state-metrics/internal/store/job.go
Lines 222 to 224 in 85d1423
I can provide a fix that sets the value regardless if there are any condition with type
Failed
.Environment:
v2.12.0
(master85d1423
)kubectl version
):v1.29.6
The text was updated successfully, but these errors were encountered: