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

Introduce new job metric kube_job_status_suspend #2511

Open
ThusharaSampath opened this issue Sep 26, 2024 · 3 comments
Open

Introduce new job metric kube_job_status_suspend #2511

ThusharaSampath opened this issue Sep 26, 2024 · 3 comments
Labels
help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. kind/feature Categorizes issue or PR as related to a new feature. triage/accepted Indicates an issue or PR is ready to be actively worked on.

Comments

@ThusharaSampath
Copy link

ThusharaSampath commented Sep 26, 2024

What would you like to be added:

As of now kube job metrics have kube_job_status_failed, kube_job_status_succeeded, kube_job_status_active to track status of a job.
With https://kubernetes.io/docs/concepts/workloads/controllers/job/#suspending-a-job jobs can be suspended. So having a status metric to track suspended jobs would be valuable.

Following are status parts of a suspended job

status:
  conditions:
  - lastProbeTime: "2024-09-26T11:25:42Z"
    lastTransitionTime: "2024-09-26T11:25:42Z"
    message: Job suspended
    reason: JobSuspended
    status: "True"
    type: Suspended

Why is this needed:

As of now there is no way to monitor suspended jobs via kube-state-metrics (via prometheus)

Describe the solution you'd like

Implement new metric similar other jobs status metrics for suspended status

Additional context

https://kubernetes.io/blog/2021/04/12/introducing-suspended-jobs/

https://github.com/kubernetes/kube-state-metrics/blob/7995d5fd23bcff7ae24ab6849f7c393d262fb025/docs/metrics/workload/job-metrics.md

@ThusharaSampath ThusharaSampath added the kind/feature Categorizes issue or PR as related to a new feature. label Sep 26, 2024
@k8s-ci-robot k8s-ci-robot added the needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. label Sep 26, 2024
@dgrisonnet
Copy link
Member

/triage accepted
/help

@k8s-ci-robot
Copy link
Contributor

@dgrisonnet:
This request has been marked as needing help from a contributor.

Guidelines

Please ensure that the issue body includes answers to the following questions:

  • Why are we solving this issue?
  • To address this issue, are there any code changes? If there are code changes, what needs to be done in the code and what places can the assignee treat as reference points?
  • Does this issue have zero to low barrier of entry?
  • How can the assignee reach out to you for help?

For more details on the requirements of such an issue, please see here and ensure that they are met.

If this request no longer meets these requirements, the label can be removed
by commenting with the /remove-help command.

In response to this:

/triage accepted
/help

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@k8s-ci-robot k8s-ci-robot added triage/accepted Indicates an issue or PR is ready to be actively worked on. help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. and removed needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. labels Oct 3, 2024
@yongruilin
Copy link

/close #2542

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. kind/feature Categorizes issue or PR as related to a new feature. triage/accepted Indicates an issue or PR is ready to be actively worked on.
Projects
None yet
Development

No branches or pull requests

4 participants