Merge pull request #69022 from k82cn/k8s_68987

Got allocatable GPUs.
This commit is contained in:
k8s-ci-robot 2018-09-27 15:53:19 -07:00 committed by GitHub
commit 01379fe61e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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()
}
}