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

feat: Add new metric kube_job_status_suspended #2542

Merged

Conversation

Indresh2410
Copy link
Contributor

What this PR does / why we need it:
Kubernetes has released a new feature which can suspend a job
https://kubernetes.io/docs/concepts/workloads/controllers/job/#suspending-a-job

Emit metrics if the job is suspended

How does this change affect the cardinality of KSM: (increases, decreases or does not change cardinality)
Increases

Which issue(s) this PR fixes (optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close the issue(s) when PR gets merged)
Fixes # #2511

@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. labels Nov 2, 2024
@k8s-ci-robot
Copy link
Contributor

This issue is currently awaiting triage.

If kube-state-metrics contributors determine this is a relevant issue, they will accept it by applying the triage/accepted label and provide further guidance.

The triage/accepted label can be added by org members by writing /triage accepted in a comment.

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
Copy link
Contributor

Welcome @Indresh2410!

It looks like this is your first PR to kubernetes/kube-state-metrics 🎉. Please refer to our pull request process documentation to help your PR have a smooth ride to approval.

You will be prompted by a bot to use commands during the review process. Do not be afraid to follow the prompts! It is okay to experiment. Here is the bot commands documentation.

You can also check if kubernetes/kube-state-metrics has its own contribution guidelines.

You may want to refer to our testing guide if you run into trouble with your tests not passing.

If you are having difficulty getting your pull request seen, please follow the recommended escalation practices. Also, for tips and tricks in the contribution process you may want to read the Kubernetes contributor cheat sheet. We want to make sure your contribution gets all the attention it needs!

Thank you, and welcome to Kubernetes. 😃

@k8s-ci-robot k8s-ci-robot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Nov 2, 2024
@Indresh2410 Indresh2410 changed the title Add new metric kube_job_status_suspended feat: Add new metric kube_job_status_suspended Nov 2, 2024
@CatherineF-dev
Copy link
Contributor

We can follow other metrics to have only 2 labels: job_name and namespace name.
https://github.com/kubernetes/kube-state-metrics/blob/a6cb8ded1e9c3688e475f94e0dabbff35a5d2396/docs/metrics/workload/job-metrics.md

@Indresh2410
Copy link
Contributor Author

Thanks @CatherineF-dev . Have addressed them. Can you please check once?

@CatherineF-dev
Copy link
Contributor

/lgtm

@k8s-ci-robot k8s-ci-robot added lgtm "Looks good to me", indicates that a PR is ready to be merged. and removed lgtm "Looks good to me", indicates that a PR is ready to be merged. labels Nov 6, 2024
@Indresh2410
Copy link
Contributor Author

@CatherineF-dev have updated doc. Because of which label got removed. Can you please check once again. SFIC

@CatherineF-dev
Copy link
Contributor

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Nov 6, 2024
@mrueg mrueg added this to the v2.14.0 milestone Nov 6, 2024
@mrueg
Copy link
Member

mrueg commented Nov 6, 2024

Can you rebase this on latest main branch? Thanks!

@Indresh2410 Indresh2410 force-pushed the add-kube-job-status-suspended-metric branch from 1e8b1dc to b2c8fa7 Compare November 7, 2024 04:38
@k8s-ci-robot k8s-ci-robot removed the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Nov 7, 2024
@Indresh2410
Copy link
Contributor Author

Have rebased @mrueg . Can you please check once?

@mrueg
Copy link
Member

mrueg commented Nov 7, 2024

@Indresh2410 it looks like the newline is missing in the doc. Could you add it?

@Indresh2410
Copy link
Contributor Author

Thanks @mrueg . Have addressed it. Can you please check once?

@mrueg
Copy link
Member

mrueg commented Nov 7, 2024

/lgtm

Thanks for your contribution!

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Nov 7, 2024
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: CatherineF-dev, Indresh2410, mrueg

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Nov 7, 2024
@k8s-ci-robot k8s-ci-robot merged commit 5e7d0f4 into kubernetes:main Nov 7, 2024
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants