mirror of
https://github.com/k3s-io/kubernetes.git
synced 2026-01-04 15:05:20 +00:00
Merge pull request #24836 from Clarifai/gpu-impl
Automatic merge from submit-queue WIP v0 NVIDIA GPU support ```release-note * Alpha support for scheduling pods on machines with NVIDIA GPUs whose kubelets use the `--experimental-nvidia-gpus` flag, using the alpha.kubernetes.io/nvidia-gpu resource ``` Implements part of #24071 for #23587 I am not familiar with the scheduler enough to know what to do with the scores. Mostly punting for now. Missing items from the implementation plan: limitranger, rkt support, kubectl support and docs cc @erictune @davidopp @dchen1107 @vishh @Hui-Zhi @gopinatht
This commit is contained in:
@@ -49,6 +49,13 @@ func (self *ResourceList) Pods() *resource.Quantity {
|
||||
return &resource.Quantity{}
|
||||
}
|
||||
|
||||
func (self *ResourceList) NvidiaGPU() *resource.Quantity {
|
||||
if val, ok := (*self)[ResourceNvidiaGPU]; ok {
|
||||
return &val
|
||||
}
|
||||
return &resource.Quantity{}
|
||||
}
|
||||
|
||||
func GetContainerStatus(statuses []ContainerStatus, name string) (ContainerStatus, bool) {
|
||||
for i := range statuses {
|
||||
if statuses[i].Name == name {
|
||||
|
||||
Reference in New Issue
Block a user