kube-state-metrics icon indicating copy to clipboard operation
kube-state-metrics copied to clipboard

[WIP] Add metrics of kube_pod_status_ready_time and kube_pod_status_containers_ready_time

Open liangyuanpeng opened this issue 2 years ago • 1 comments

What this PR does / why we need it: Base PR https://github.com/kubernetes/kube-state-metrics/pull/1482

Ref: Adds kube_pod_status_ready_time and kube_pod_status_containers_ready_time metrics to get the information provided by Pod Lifecycle's PodConditions array.

Maybe we should support param to open this feature or not, juse like feature-gates.

How does this change affect the cardinality of KSM: (increases, decreases or does not change cardinality) increases metrics number that Pod number * 2

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 #1465,#1830

liangyuanpeng avatar Sep 18 '22 09:09 liangyuanpeng

It would be great to have this PR merged as it is blocking efforts on my team.

coleary-hyperscience avatar Oct 17 '22 18:10 coleary-hyperscience

Would love to see this PR merged, as those metrics are valuable in determining pod startup times and issues related to it.

If needed can definitely help with making sure the code meets all the requirements.

@dgrisonnet @fpetkovski Do you think you can review this in the upcoming days? Thanks!

azalenski-branch avatar Oct 20 '22 12:10 azalenski-branch

@CatherineF-dev: Closed this PR.

In response to this:

/close

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/test-infra repository.

k8s-ci-robot avatar Oct 20 '22 13:10 k8s-ci-robot

/reopen

Sry, I only want to close that comment..

CatherineF-dev avatar Oct 20 '22 13:10 CatherineF-dev

@CatherineF-dev: Reopened this PR.

In response to this:

/reopen

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/test-infra repository.

k8s-ci-robot avatar Oct 20 '22 13:10 k8s-ci-robot

I'm working for rebase commit and finish it tomorrow.

liangyuanpeng avatar Oct 20 '22 15:10 liangyuanpeng

I am fine with these new metrics. To address some initial concerns that were raised in https://github.com/kubernetes/kube-state-metrics/issues/1465#issuecomment-855922085, it is very unlikely that these metrics will surface in kubelet today due to their cardinality, so I think they are a good fit for ksm.

@liangyuanpeng there is still one unresolved comment, could you have a look at it when you have some times on your hands?

dgrisonnet avatar Nov 03 '22 17:11 dgrisonnet

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: liangyuanpeng, logicalhan Once this PR has been reviewed and has the lgtm label, please assign fpetkovski for approval by writing /assign @fpetkovski in a comment. For more information see the Kubernetes Code Review Process.

The full list of commands accepted by this bot can be found 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 avatar Nov 03 '22 17:11 k8s-ci-robot

@liangyuanpeng: PR needs rebase.

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/test-infra repository.

k8s-ci-robot avatar Nov 04 '22 00:11 k8s-ci-robot

@liangyuanpeng would you mind resolving conflicts against master?

fpetkovski avatar Nov 04 '22 09:11 fpetkovski

Sorry for my late and would be work for it in this week.

liangyuanpeng avatar Nov 16 '22 09:11 liangyuanpeng

Sorry for my late and would be work for it in this week.

@liangyuanpeng anything I can do to help get this over the finish line?

rumstead avatar Dec 05 '22 17:12 rumstead

@liangyuanpeng can we please get this merged, it would be of great help to us. I see that there is only merge conflict to be resolved as a last step. We are also waiting on this to use this metric in our k8s clusters.

This will enable our customers/users to get better insights into the pod behaviour and fine tune their respective apps wherever necessary.

cc @fpetkovski @logicalhan

akifkhan01 avatar Dec 09 '22 05:12 akifkhan01

Sorry for my late and i still want to work for it and as soon as push it.

liangyuanpeng avatar Dec 09 '22 10:12 liangyuanpeng

Thanks @liangyuanpeng for the response and being on top of it.

akifkhan01 avatar Dec 09 '22 10:12 akifkhan01

@liangyuanpeng can I help in anyway to get this merged?

akifkhan01 avatar Dec 19 '22 11:12 akifkhan01

I created PR on @liangyuanpeng's fork resolving the merge conflict. Hope it helps. 🤞

ryanrolds avatar Dec 22 '22 18:12 ryanrolds

At some point this may have to be resolved without further work from the OP.

ryanrolds avatar Dec 27 '22 16:12 ryanrolds

Since @liangyuanpeng expressed their intention to push this effort over the finish line I'd rather wait a bit more for them to get the time they need to work on it again rather than prevent them to finish the work they started.

I would only reconsider that if we are close to a release and the PR hasn't been merged already, but for now there is no hurry at all so don't feel pressured.

dgrisonnet avatar Jan 02 '23 11:01 dgrisonnet

I had to preform a rebase and deal with merge conflicts (new method was inserted in the same spot as methods added by these PRs) in the other PR. I'm not going to say I won't keep up with the rebases and merge conflicts in the other PR, but I would appreciate not having to spend that time.

ryanrolds avatar Jan 11 '23 00:01 ryanrolds

@liangyuanpeng are you able to proceed with this PR? Otherwise we will continue on https://github.com/kubernetes/kube-state-metrics/pull/1938 after mid next week.

mrueg avatar Jan 12 '23 10:01 mrueg

Closing this PR as it will be superseded by https://github.com/kubernetes/kube-state-metrics/pull/1938

Thanks!

mrueg avatar Jan 19 '23 13:01 mrueg