-
Notifications
You must be signed in to change notification settings - Fork 38.7k
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
Look for pods in ownerReferences of PVC #120427
Look for pods in ownerReferences of PVC #120427
Conversation
Hi @MaGaroo. 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 Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. 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. |
/ok-to-test |
This will most likely fail due to new dependency, which I already mentioned should not be pulled in, when you fix it, please add unit test and ping me on slack (same nick) for a re-review. |
Thanks for the review. @soltysh /retest |
/retest |
3e285b0
to
4d6e664
Compare
/label tide/merge-method-squash |
/triage accepted |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/lgtm
/approve
LGTM label has been added. Git tree hash: e40e3d136af1cb58109754d09c0d4fe855ceabdb
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: MaGaroo, soltysh 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 |
* Look for pods in ownerReferences of PVC * Implement for loop instead of using slices package * Add tests for getPodsForPVC function * Make PVC names consistent * Remove volumes part of the pvc owner pod * Do not store result of append in another variable * Fix lint error
What type of PR is this?
/kind feature
What this PR does / why we need it:
In order to find the usages of a PVC, the current implementation of
PersistentVolumeClaim
looks for the PVC inSpec.Volumes
of all pods. But if a pod requests for an ephemeral storage volume provided by a CSI, an equivalent PVC will be created and this PVC's name will not exist in the pod'sSpec.Volumes
.However, these kind of PVCs (for example the ones created by
rbd.csi.ceph.com
CSI) will list the owner pods in the PVC'sownerReferences
metadata. The objective of this PR is to list these pods in theUsed by:
part of the PVC's description.Which issue(s) this PR fixes:
I couldn't find any issue related to this problem.
Special notes for your reviewer:
Does this PR introduce a user-facing change?
Additional documentation e.g., KEPs (Kubernetes Enhancement Proposals), usage docs, etc.: