Skip to content
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

Scraping the failure reason for a job does a case-sensitive search that fails #2045

Closed
juanjjaramillo opened this issue Apr 13, 2023 · 1 comment · Fixed by #2046
Closed
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.

Comments

@juanjjaramillo
Copy link
Contributor

juanjjaramillo commented Apr 13, 2023

What happened:
When scraping the failure reason for a job, KSM does a case-sensitive search for the keyword DeadLineExceeded. Since Kubernetes is generating the string DeadlineExceeded, the search fails to scrape the reason.

What you expected to happen:
A case-insensitive search should be done, so changes in reason's casing would not impact scraping of the metric.

How to reproduce it (as minimally and precisely as possible):
Create a job that fails to meet the .spec.activeDeadlineSeconds, forcing Kubernetes to kill the job with reason DeadlineExceeded.

Anything else we need to know?:
I'm proposing a solution in PR #2046

Environment:

  • kube-state-metrics version: 2.8.2
  • Kubernetes version (use kubectl version): 1.26.3
@juanjjaramillo juanjjaramillo added the kind/bug Categorizes issue or PR as related to a bug. label Apr 13, 2023
@k8s-ci-robot k8s-ci-robot added the needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. label Apr 13, 2023
@dgrisonnet
Copy link
Member

/triage accepted

@k8s-ci-robot k8s-ci-robot added triage/accepted Indicates an issue or PR is ready to be actively worked on. and removed needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. labels Apr 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
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.
Projects
None yet
3 participants