فهرست منبع

Merge pull request #467 from kubecost/AjayTripathy-store-datamins

store datamins
Ajay Tripathy 5 سال پیش
والد
کامیت
522926c2ef
1فایلهای تغییر یافته به همراه2 افزوده شده و 1 حذف شده
  1. 2 1
      pkg/costmodel/cluster.go

+ 2 - 1
pkg/costmodel/cluster.go

@@ -81,6 +81,7 @@ type ClusterCosts struct {
 	StorageBreakdown  *ClusterCostsBreakdown `json:"storageBreakdown"`
 	TotalCumulative   float64                `json:"totalCumulativeCost"`
 	TotalMonthly      float64                `json:"totalMonthlyCost"`
+	DataMinutes       float64
 }
 
 // ClusterCostsBreakdown provides percentage-based breakdown of a resource by
@@ -396,7 +397,7 @@ func ComputeClusterCosts(client prometheus.Client, provider cloud.Provider, wind
 			costs.StorageBreakdown.Idle = (costs.StorageCumulative - pvUC) / costs.StorageCumulative
 			costs.StorageBreakdown.User = pvUC / costs.StorageCumulative
 		}
-
+		costs.DataMinutes = dataMins
 		costsByCluster[id] = costs
 	}