diff --git a/pkg/resourcemonitor/noderesourcesaggregator.go b/pkg/resourcemonitor/noderesourcesaggregator.go index 0b92ddf75e..8254d35965 100644 --- a/pkg/resourcemonitor/noderesourcesaggregator.go +++ b/pkg/resourcemonitor/noderesourcesaggregator.go @@ -152,6 +152,29 @@ func (noderesourceData *nodeResources) Aggregate(podResData []PodResources) topo available: int64(0), capacity: int64(len(noderesourceData.reservedCPUIDPerNUMA[nodeID])), } + + for resName, allocatable := range nodeRes { + perNuma[nodeID][resName] = &resourceData{ + allocatable: allocatable, + available: allocatable, + capacity: allocatable, + } + + rn := string(resName) + noderesourceData.resourceID2NUMAID[rn] = make(map[string]int) + + for _, podRes := range podResData { + for _, contRes := range podRes.Containers { + for _, res := range contRes.Resources { + if res.Name == resName { + for _, deviceID := range res.Data { + noderesourceData.resourceID2NUMAID[rn][deviceID] = nodeID + } + } + } + } + } + } } }