mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-31 15:25:57 +00:00
Got allocatable GPUs.
Signed-off-by: Da K. Ma <klaus1982.cn@gmail.com>
This commit is contained in:
parent
488f0fcda3
commit
adbdbdec49
@ -98,7 +98,7 @@ func getGPUsAvailable(f *framework.Framework) int64 {
|
||||
framework.ExpectNoError(err, "getting node list")
|
||||
var gpusAvailable int64
|
||||
for _, node := range nodeList.Items {
|
||||
if val, ok := node.Status.Capacity[gpuResourceName]; ok {
|
||||
if val, ok := node.Status.Allocatable[gpuResourceName]; ok {
|
||||
gpusAvailable += (&val).Value()
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user