-
Notifications
You must be signed in to change notification settings - Fork 296
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
Keep adjusted workload resources in sync with limitRanges and runtimeClasses #653
Keep adjusted workload resources in sync with limitRanges and runtimeClasses #653
Conversation
✅ Deploy Preview for kubernetes-sigs-kueue canceled.
|
Hi @trasc. Thanks for your PR. I'm waiting for a kubernetes-sigs 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 |
0490283
to
ff53e85
Compare
/cc @alculquicondor |
@@ -71,6 +71,12 @@ type PodSetFlavors struct { | |||
|
|||
// Flavors are the flavors assigned to the workload for each resource. | |||
Flavors map[corev1.ResourceName]ResourceFlavorReference `json:"flavors,omitempty"` |
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.
we are on time to change PodSetFlavors
by something else, given that it's no longer just about flavors.
Maybe PodSetAssignments
is a bit more generic?
And we could have a single list holding both the quantity and the flavor, instead of two maps. I'm not to sure about this one. How does the calculation of workload.Info
change if we do this?
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.
For the first part done.
For the second one ... , it will imply adding two addition conversion methods ... but it will look strange. Also since ResourceList is "standard", I'd say to keep it as is. (also the time that will take to re-re-work the tests might not be negligible )
ff0c7e3
to
36f230d
Compare
f2a40c7
to
7c4469a
Compare
/retest |
just nits |
77073b5
to
39c14be
Compare
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.
/approve
Just couple of typos
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: alculquicondor, trasc 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 |
39c14be
to
f9017ca
Compare
/label tide/merge-method-squash |
/lgtm cancel It looks like this is introducing a flaky test. Please investigate |
https://testgrid.k8s.io/sig-scheduling#periodic-kueue-test-integration-main testgrid looks fine, so I don't think this is a problem in the current test suite. |
gomega.Expect(k8sClient.Create(ctx, localQueue)).To(gomega.Succeed()) | ||
}) | ||
ginkgo.AfterEach(func() { | ||
ginkgo.By("Resource consumption should be 0", func() { |
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.
ginkgo.By("Resource consumption should be 0", func() { | |
ginkgo.By("Resource consumption should be 0 and no pending workloads", func() { |
// | ||
// Beside what is provided in podSet's specs, this calculation takes into account | ||
// the LimitRange defaults and RuntimeClass overheads at the moment of admission. | ||
ResourceUsage corev1.ResourceList `json:"resourceUsage,omitempty"` |
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.
Can you make a PR that includes the field name changes without adding ResourceUsage
?
I would like to merge that before cutting the release.
If this PR ends up taking longer, we can leave it to the next release.
Set both the flavor and the request values in a single call.
f9017ca
to
a956f88
Compare
passed 1/3 /test pull-kueue-test-integration-main |
passed 2/3 /test pull-kueue-test-integration-main /milestone v0.3 |
passed 3/3 /lgtm |
What type of PR is this?
/kind feature
What this PR does / why we need it:
Keeps in sync the adjusted workload resource needs (which are computed based on the workload's spec, potential cluster resourceClass definition and potential namespace limitRange definition) , with the cluster context (limitRanges and runtimeClasses).
In addition, now, the admission status struct keeps track of the workload's resource needs at the admission time, this values being the source for computing the resource needs for the admitted workloads.
Which issue(s) this PR fixes:
Fixes #611
Special notes for your reviewer: