-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Consider initContainer GPUs quota in calculating #2423
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
Consider initContainer GPUs quota in calculating #2423
Conversation
|
Welcome @kerthcet! |
pkg/scheduler/api/device_info.go
Outdated
|
|
||
| // getGPUResourceOfPod returns the GPU resource required by the container. | ||
| func getGPUResourceOfContainer(container *v1.Container) uint { | ||
| func getGPUResourceOfContainer(container v1.Container) uint { |
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.
Suggest to keep the object reference as the input parameter for we only need the spec.resource part. That will be more efficient.
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.
Make sense, currently we pass a value here.
Signed-off-by: kerthcet <[email protected]>
0a27f6b to
d824529
Compare
|
Updated and squashed. |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: Thor-wl 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 |
hwdef
left a comment
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
Thanks!
|
@kerthcet Hi, Could you cherry pick this patch to branch v1.6/v.15/v1.4? It makes sense. |
|
I think you mean release-1.6, release-1.5, release-1.4, right? |
Yes. |
Signed-off-by: kerthcet [email protected]
fix: #2422