Преглед изворни кода

fix computation to not use the byes with the cost per gb hour metric in the case where the node instance

Signed-off-by: Alex Meijer <ameijer@kubecost.com>
Alex Meijer пре 3 година
родитељ
комит
25ca5c65f3
1 измењених фајлова са 1 додато и 1 уклоњено
  1. 1 1
      pkg/costmodel/costmodel.go

+ 1 - 1
pkg/costmodel/costmodel.go

@@ -1216,7 +1216,7 @@ func (cm *CostModel) GetNodeCost(cp costAnalyzerCloud.Provider) (map[string]*cos
 				}
 			} else { // add case to use default pricing model when API data fails.
 				log.Debugf("No node price or CPUprice found, falling back to default")
-				nodePrice = defaultCPU*cpu + defaultRAM*ram
+				nodePrice = defaultCPU*cpu + defaultRAM*ramGB
 			}
 			if math.IsNaN(nodePrice) {
 				log.Warnf("nodePrice parsed as NaN. Setting to 0.")