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

feat: #2501 Count volumes attached to a node

Open LiuQhahah opened this issue 1 year ago • 8 comments

What this PR does / why we need it:

Count volumes attached to a node

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

increaser two metrics: kube_node_volumes_attached_count and kube_node_volumes_in_use_count

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 #2501

LiuQhahah avatar Sep 23 '24 12:09 LiuQhahah

I understand what you're trying to achieve here, I wonder though if it would be easier to attach a node label to the kube_volumeattachment_status_attached metric or a similar one and then do a sum by that label in promql instead of exposing counts here.

mrueg avatar Sep 23 '24 20:09 mrueg

I understand what you're trying to achieve here, I wonder though if it would be easier to attach a node label to the kube_volumeattachment_status_attached metric or a similar one and then do a sum by that label in promql instead of exposing counts here.

Thanks for the suggestion, from my understanding @thommeo wants to get the number of volumns currently attached from the perspective of node, and kube_volumeattachment_status_attached is from volumnattachment from volumeattachments to count the number of volumns he is attached to by that node attchment.

From my personal understanding and implementation point of view, I think creating a metric will be better understood, the current implementation is not so complex, so that the use of the customer will be more convenient!

LiuQhahah avatar Sep 24 '24 05:09 LiuQhahah

/triage accepted /assign

dgrisonnet avatar Oct 03 '24 16:10 dgrisonnet

The Kubernetes project currently lacks enough contributors to adequately respond to all PRs.

This bot triages PRs according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the PR is closed

You can:

  • Mark this PR as fresh with /remove-lifecycle stale
  • Close this PR with /close
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle stale

k8s-triage-robot avatar Feb 10 '25 23:02 k8s-triage-robot

/remove-lifecycle stale

thommeo avatar Feb 11 '25 09:02 thommeo

The Kubernetes project currently lacks enough contributors to adequately respond to all PRs.

This bot triages PRs according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the PR is closed

You can:

  • Mark this PR as fresh with /remove-lifecycle stale
  • Close this PR with /close
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle stale

k8s-triage-robot avatar May 12 '25 10:05 k8s-triage-robot

/remove-lifecycle stale

thommeo avatar May 12 '25 12:05 thommeo

The Kubernetes project currently lacks enough contributors to adequately respond to all PRs.

This bot triages PRs according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the PR is closed

You can:

  • Mark this PR as fresh with /remove-lifecycle stale
  • Close this PR with /close
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle stale

k8s-triage-robot avatar Aug 10 '25 12:08 k8s-triage-robot

Hello, there's tests failing for this patch, could you please address those?

rexagod avatar Aug 27 '25 01:08 rexagod

Hello, there's tests failing for this patch, could you please address those?

The action history is too long to find the log. Could you please help retrigger it? thanks

LiuQhahah avatar Aug 27 '25 01:08 LiuQhahah

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: LiuQhahah Once this PR has been reviewed and has the lgtm label, please ask for approval from dgrisonnet. For more information see the 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 Aug 27 '25 01:08 k8s-ci-robot

The Kubernetes project currently lacks enough active contributors to adequately respond to all PRs.

This bot triages PRs according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the PR is closed

You can:

  • Mark this PR as fresh with /remove-lifecycle rotten
  • Close this PR with /close
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle rotten

k8s-triage-robot avatar Sep 26 '25 02:09 k8s-triage-robot

CLA Signed

The committers listed above are authorized under a signed CLA.

  • :white_check_mark: login: LiuQhahah / name: Qiang-Liu (08c753e50ba27038517498f9748f64becad6553e, 4810efda23ff5e6ff31adad1f237a6d07e17458b, 7c129f13d664c6bdfbbac7c0eaf105158a4a5c66, a8648fd1851ff80a52a0c2fa1b2f03623ec46f67, e4b6971688e413d226622ed8c09564e2ce764042)

The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs.

This bot triages PRs according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the PR is closed

You can:

  • Reopen this PR with /reopen
  • Mark this PR as fresh with /remove-lifecycle rotten
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/close

k8s-triage-robot avatar Nov 14 '25 08:11 k8s-triage-robot

@k8s-triage-robot: Closed this PR.

In response to this:

The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs.

This bot triages PRs according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the PR is closed

You can:

  • Reopen this PR with /reopen
  • Mark this PR as fresh with /remove-lifecycle rotten
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/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-sigs/prow repository.

k8s-ci-robot avatar Nov 14 '25 08:11 k8s-ci-robot

It was almost finished, wasn't it? Can we reopen it or open another PR with the same change? @LiuQhahah

thommeo avatar Nov 14 '25 18:11 thommeo

HI @thommeo I have created another PR https://github.com/kubernetes/kube-state-metrics/pull/2810 Thanks

LiuQhahah avatar Nov 17 '25 01:11 LiuQhahah