Add PVCRef to VolumeStats#51448
Add PVCRef to VolumeStats#51448k8s-github-robot merged 1 commit intokubernetes:masterfrom kastenhq:pvc_ref_volstats
Conversation
|
Hi @vkamra. Thanks for your PR. I'm waiting for a kubernetes member to verify that this patch is reasonable to test. If it is, they should reply with I understand the commands that are listed here. DetailsInstructions 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. I understand the commands that are listed here. |
|
/cc @jingxu97 |
|
/ok-to-test |
|
/sig storage |
|
The issue is wrong, should link to kubernetes/features. also needs hack/update-bazel.sh to pass verify 👍 |
| @@ -0,0 +1,141 @@ | |||
| /* | |||
| Copyright 2016 The Kubernetes Authors. | |||
|
Do you have manual test for see whether the stats are working? |
|
@wongma7 - will do - thanks |
|
@jingxu97 - have tested manually (output below for a stateful set pod) |
|
Could you also add a release note in the commit? Thanks! |
|
@jingxu97 - done |
|
/retest |
| return stats.VolumeStats{ | ||
| Name: podName, | ||
| Name: podName, | ||
| PVCRef: pvcRef, |
There was a problem hiding this comment.
I am thinking to check pvcRef is nil or not here. If it is nil, return stats.VolumeStats without PVCRef field
There was a problem hiding this comment.
the result will be the same since PVCRef will default to nil whether we explicitly set PVCRef: nil, or not at all
There was a problem hiding this comment.
Is this needed - the behavior would be the same i.e VolumeStats.PVCRef will be nil in both cases?
There was a problem hiding this comment.
ok, I am hoping if PVCRef is nil, the printed result of volumestat will not show this field, instead of showing PVCRef: nil?
There was a problem hiding this comment.
👍 - it won't. It's tagged optional/omit-empty.
|
cc @derekwaynecarr @Random-Liu could you please help approve this PR? Thanks! |
|
/retest |
|
yeah it looks like flakes to me, gpu is currently flaky and "TestCRD" looks like it's not just us |
|
/retest |
|
@vkamra, you don't need to run /retest which run all the tests again. Just the tests that failed, like Also for verify test, you can try to run locally with hack/verify-bazel.sh |
|
/lgtm |
|
cc @tallclair Could you help approve this PR? |
|
/test pull-kubernetes-e2e-gce-etcd3 |
For pod volumes that reference a PVC, add a PVCRef to the corresponding volume stat. This allows metrics to be indexed/queried by PVC name which is more user-friendly than Pod reference
@jingxu97 fyi: |
|
/retest |
|
@xiangpengzhao thanks for the information! Good to know that. |
|
/approve |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: derekwaynecarr, jingxu97, vkamra Associated issue: 363 The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these OWNERS Files:
You can indicate your approval by writing |
|
Automatic merge from submit-queue (batch tested with PRs 51513, 51515, 50570, 51482, 51448) |
Automatic merge from submit-queue Expose PVC metrics via kubelet prometheus This depends on #51448, opening early though. second commit is mine and mostly a copy/paste job. implements metrics listed in here kubernetes/community#855 following method here kubernetes/community#930 (comment) **Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: kubernetes/enhancements#363 **Special notes for your reviewer**: **Release note**: ```release-note PersistentVolumeClaim metrics like "volume_stats_inodes" and "volume_stats_capacity_bytes" are now reported via kubelet prometheus ```
For pod volumes that reference a PVC, add a PVCRef to the corresponding volume stat. This allows metrics to be indexed/queried by PVC name which is more user-friendly than Pod reference See kubernetes#51448.
What this PR does / why we need it:
For pod volumes that reference a PVC, add a PVCRef to the corresponding
volume stat. This allows metrics to be indexed/queried by PVC name
which is more user-friendly than Pod reference
Which issue this PR fixes : #363
Special notes for your reviewer:
Release note: