瀏覽代碼

Merge pull request #169 from kubecost/AjayTripathy-fix-api-azure

set azure default discount
Ajay Tripathy 7 年之前
父節點
當前提交
ea33c2019f
共有 1 個文件被更改,包括 3 次插入0 次删除
  1. 3 0
      cloud/azureprovider.go

+ 3 - 0
cloud/azureprovider.go

@@ -525,6 +525,9 @@ func (az *Azure) UpdateConfig(r io.Reader, updateType string) (*CustomPricing, e
 }
 func (az *Azure) GetConfig() (*CustomPricing, error) {
 	c, err := GetDefaultPricingData("azure.json")
+	if c.Discount == "" {
+		c.Discount = "0%"
+	}
 	if err != nil {
 		return nil, err
 	}