Delete resourceclaims on job completion or termination
When batch/v1 job requesting a GPU claim through resourceclaim is completed, the underlying resourceclaim is still in allocated, reserved state. This will lead to resource wastage. I think we should delete the claim if the object consuming the resourceclaim completes or terminates
This has been discussed in the past but in any case has nothing to do with the specifics of NVIDIAs DRA driver for GPUs (this is an issue for upstream Kubernetes where I believe a similar issue has already been created).
To be clear tough — the claim itself cannot (and should) not be deleted. Only the resources allocated to the claim should be freed but the claim itself should remain.
Can you share more light why claim should not be deleted?
Just as with any other API server object -- if the user creates the claim, it should be the user that also deletes it. Claims created as part of a ClaimTemplate will be cleaned up by the system because the claims were created by the system. But claims created by the user (e.g. via a kubectl apply) will only be deleted upon request by the user (e.g. via a kubectl delete).
Which version of Kubernetes was used? I just tested with 1.28 and our latest DRA driver. Just like I remembered - this has been fixed some time ago - 1.27 or 1.28, the deallocatoin part at least. The Claims created manually stay, but they are no longer allocated, and Claims generated even get deleted.
The Kubernetes project currently lacks enough contributors to adequately respond to all issues.
This bot triages un-triaged issues according to the following rules:
- After 90d of inactivity,
lifecycle/staleis applied - After 30d of inactivity since
lifecycle/stalewas applied,lifecycle/rottenis applied - After 30d of inactivity since
lifecycle/rottenwas applied, the issue is closed
You can:
- Mark this issue as fresh with
/remove-lifecycle stale - Close this issue with
/close - Offer to help out with Issue Triage
Please send feedback to sig-contributor-experience at kubernetes/community.
/lifecycle stale
The Kubernetes project currently lacks enough active contributors to adequately respond to all issues.
This bot triages un-triaged issues according to the following rules:
- After 90d of inactivity,
lifecycle/staleis applied - After 30d of inactivity since
lifecycle/stalewas applied,lifecycle/rottenis applied - After 30d of inactivity since
lifecycle/rottenwas applied, the issue is closed
You can:
- Mark this issue as fresh with
/remove-lifecycle rotten - Close this issue with
/close - Offer to help out with Issue Triage
Please send feedback to sig-contributor-experience at kubernetes/community.
/lifecycle rotten
@klueska is this the issue you had in mind? https://github.com/kubernetes/kubernetes/issues/120756
The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs.
This bot triages issues according to the following rules:
- After 90d of inactivity,
lifecycle/staleis applied - After 30d of inactivity since
lifecycle/stalewas applied,lifecycle/rottenis applied - After 30d of inactivity since
lifecycle/rottenwas applied, the issue is closed
You can:
- Reopen this issue with
/reopen - Mark this issue as fresh with
/remove-lifecycle rotten - Offer to help out with Issue Triage
Please send feedback to sig-contributor-experience at kubernetes/community.
/close not-planned
@k8s-triage-robot: Closing this issue, marking it as "Not Planned".
In response to this:
The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs.
This bot triages issues according to the following rules:
- After 90d of inactivity,
lifecycle/staleis applied- After 30d of inactivity since
lifecycle/stalewas applied,lifecycle/rottenis applied- After 30d of inactivity since
lifecycle/rottenwas applied, the issue is closedYou can:
- Reopen this issue with
/reopen- Mark this issue as fresh with
/remove-lifecycle rotten- Offer to help out with Issue Triage
Please send feedback to sig-contributor-experience at kubernetes/community.
/close not-planned
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.