فهرست منبع

Merge pull request #365 from kubecost/bolt/azure-per-gb-fix

Azure PV Pricing Adjustment
Ajay Tripathy 6 سال پیش
والد
کامیت
7d6b721de9
1فایلهای تغییر یافته به همراه2 افزوده شده و 2 حذف شده
  1. 2 2
      pkg/cloud/azureprovider.go

+ 2 - 2
pkg/cloud/azureprovider.go

@@ -408,8 +408,8 @@ func (az *Azure) DownloadPricingData() error {
 						for _, rate := range v.MeterRates {
 						for _, rate := range v.MeterRates {
 							priceInUsd += *rate
 							priceInUsd += *rate
 						}
 						}
-						// rate is in GB per month, resolve to GB per hour
-						pricePerHour := priceInUsd / 730.0
+						// rate is in disk per month, resolve price per hour, then GB per hour
+						pricePerHour := priceInUsd / 730.0 / 32.0
 						priceStr := fmt.Sprintf("%f", pricePerHour)
 						priceStr := fmt.Sprintf("%f", pricePerHour)
 
 
 						key := region + "," + storageClass
 						key := region + "," + storageClass