Bladeren bron

Fix bug in retrieving allocation totals by node

Niko Kovacevic 4 jaren geleden
bovenliggende
commit
288b0f9328
1 gewijzigde bestanden met toevoegingen van 1 en 1 verwijderingen
  1. 1 1
      pkg/kubecost/totals.go

+ 1 - 1
pkg/kubecost/totals.go

@@ -618,7 +618,7 @@ func (mts *MemoryTotalsStore) GetAllocationTotalsByCluster(start time.Time, end
 // by node for the given start and end times.
 func (mts *MemoryTotalsStore) GetAllocationTotalsByNode(start time.Time, end time.Time) (map[string]*AllocationTotals, bool) {
 	k := storeKey(start, end)
-	if raw, ok := mts.allocTotalsByNode.Get(k); ok {
+	if raw, ok := mts.allocTotalsByNode.Get(k); !ok {
 		return map[string]*AllocationTotals{}, false
 	} else {
 		original := raw.(map[string]*AllocationTotals)