Return only isolated cpus in podresources interface

Co-Authored-by: Swati Sehgal <swsehgal@redhat.com>
Signed-off-by: Alexey Perevalov <alexey.perevalov@huawei.com>
This commit is contained in:
Alexey Perevalov
2020-12-21 04:21:25 -05:00
committed by Swati Sehgal
parent c4d802b0b5
commit 5d9032007a
4 changed files with 25 additions and 8 deletions

View File

@@ -1064,7 +1064,7 @@ func (cm *containerManagerImpl) GetAllocatableDevices() []*podresourcesapi.Conta
func (cm *containerManagerImpl) GetCPUs(podUID, containerName string) []int64 {
if cm.cpuManager != nil {
return cm.cpuManager.GetCPUs(podUID, containerName).ToSliceNoSortInt64()
return cm.cpuManager.GetExclusiveCPUs(podUID, containerName).ToSliceNoSortInt64()
}
return []int64{}
}