Explorar el Código

actually commit file

Ajay Tripathy hace 5 años
padre
commit
c78b39a979
Se han modificado 1 ficheros con 2 adiciones y 0 borrados
  1. 2 0
      pkg/costmodel/costmodel.go

+ 2 - 0
pkg/costmodel/costmodel.go

@@ -901,10 +901,12 @@ func GetPVCost(pv *costAnalyzerCloud.PV, kpv *v1.PersistentVolume, cp costAnalyz
 	key := cp.GetPVKey(kpv, pv.Parameters, defaultRegion)
 	pvWithCost, err := cp.PVPricing(key)
 	if err != nil {
+		pv.ProviderID = key.ID()
 		pv.Cost = cfg.Storage
 		return err
 	}
 	if pvWithCost == nil || pvWithCost.Cost == "" {
+		pv.ProviderID = key.ID()
 		pv.Cost = cfg.Storage
 		return nil // set default cost
 	}