DRA extended resource quota#134210
Conversation
|
This PR may require API review. If so, when the changes are ready, complete the pre-review checklist and request an API review. Status of requested reviews is tracked in the API Review project. |
|
/retest |
|
lgtm, go ahead and squash for merge |
pohly
left a comment
There was a problem hiding this comment.
Some nits on the DRA part. Non-blocking, can also be a future cleanup PR.
| func (c *ExtendedResourceCache) updateClassMapping(deviceClass *resourceapi.DeviceClass) { | ||
| if deviceClass == nil { | ||
| return | ||
| } |
There was a problem hiding this comment.
Why the nil check?
As far as I can tell it's always called with a valid instance.
Might be worth removing also for the other methods, I missed that earlier.
There was a problem hiding this comment.
removed the nil check in this and other methods
| // mapping maps extended resource name to device class name | ||
| mapping map[v1.ResourceName]string | ||
| // classMapping maps device class name to extended resource name | ||
| classMapping map[string]string |
There was a problem hiding this comment.
Hmm, now the naming of these "mappings" is a bit unfortunate.
How about this?
mapping -> resourceName2class
classMapping -> class2ResourceName
The log message also seem a bit ambiguous.
There was a problem hiding this comment.
renamed to resourceName2class and class2ResourceName
| func (c *ExtendedResourceCache) removeClassMapping(deviceClass *resourceapi.DeviceClass) { | ||
| if deviceClass == nil { | ||
| return | ||
| } |
| pod := b.Pod() | ||
| res := v1.ResourceList{} | ||
|
|
||
| // b.ExtendedResourceName(0) is added to the deivce class with name: b.ClassName()+"0" |
There was a problem hiding this comment.
| // b.ExtendedResourceName(0) is added to the deivce class with name: b.ClassName()+"0" | |
| // b.ExtendedResourceName(0) is added to the device class with name: b.ClassName()+"0" |
…gular resource claims
|
@liggitt squashed the commits, PTAL |
|
/retest |
|
/lgtm |
|
LGTM label has been added. DetailsGit tree hash: 416626f4f143ad14d618f284299a1445545e2cbf |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: liggitt, yliaog The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
/retest-required |
|
/retest |
5 similar comments
|
/retest |
|
/retest |
|
/retest |
|
/retest |
|
/retest |
|
/lgtm Known flakes. |
Please avoid rebases during squashing. You can use |
|
@yliaog: The following test failed, say
Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR. 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-sigs/prow repository. I understand the commands that are listed here. |
|
/test pull-kubernetes-e2e-gce |
| b := drautils.NewBuilder(f, driver) | ||
| b.UseExtendedResourceName = true | ||
|
|
||
| ginkgo.It("must run a pod with extended resource with resource quota", func(ctx context.Context) { |
What type of PR is this?
/kind feature
What this PR does / why we need it:
adjusts DRA extended resource quota to include devices usages from regular resource claims
Which issue(s) this PR is related to:
#133671
Special notes for your reviewer:
Does this PR introduce a user-facing change?
Additional documentation e.g., KEPs (Kubernetes Enhancement Proposals), usage docs, etc.: