Skip to content
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

Take initContainer's GPU quota into consideration #2422

Closed
kerthcet opened this issue Aug 10, 2022 · 1 comment · Fixed by #2423
Closed

Take initContainer's GPU quota into consideration #2422

kerthcet opened this issue Aug 10, 2022 · 1 comment · Fixed by #2423
Assignees
Labels
kind/feature Categorizes issue or PR as related to a new feature.

Comments

@kerthcet
Copy link
Member

What would you like to be added:

Currently when calculating pod GPU resources, we just consider the spec.Containers but the spec.InitContainers, actually we should.

func GetGPUResourceOfPod(pod *v1.Pod) uint {
	var mem uint
	for _, container := range pod.Spec.Containers {
		mem += getGPUResourceOfContainer(&container)
	}
	return mem
}

So the value should be
Max(max(initContainers), sum(Containers))

Why is this needed:

@kerthcet kerthcet added the kind/feature Categorizes issue or PR as related to a new feature. label Aug 10, 2022
@kerthcet
Copy link
Member Author

/assign

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/feature Categorizes issue or PR as related to a new feature.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant