Kaynağa Gözat

support casing mismatch between k8s and provider

AjayTripathy 5 yıl önce
ebeveyn
işleme
99458adfca
1 değiştirilmiş dosya ile 2 ekleme ve 2 silme
  1. 2 2
      pkg/cloud/csvprovider.go

+ 2 - 2
pkg/cloud/csvprovider.go

@@ -118,8 +118,8 @@ func (c *CSVProvider) DownloadPricingData() error {
 		}
 		klog.V(4).Infof("Found price info %+v", p)
 		key := p.InstanceID
-		if p.Region != "" {
-			key = fmt.Sprintf("%s,%s", p.Region, p.InstanceID)
+		if p.Region != "" { // strip the casing from region and add to key.
+			key = fmt.Sprintf("%s,%s", strings.ToLower(p.Region), p.InstanceID)
 			c.UsesRegion = true
 		}
 		if p.AssetClass == "pv" {