Explorar el Código

fix default azure prices

AjayTripathy hace 6 años
padre
commit
a053ac4411
Se han modificado 1 ficheros con 9 adiciones y 1 borrados
  1. 9 1
      cloud/azureprovider.go

+ 9 - 1
cloud/azureprovider.go

@@ -418,7 +418,15 @@ func (az *Azure) NodePricing(key Key) (*Node, error) {
 		return n, nil
 		return n, nil
 	}
 	}
 	klog.V(1).Infof("Warning: no pricing data found for %s: %s", key.Features(), key)
 	klog.V(1).Infof("Warning: no pricing data found for %s: %s", key.Features(), key)
-	return nil, fmt.Errorf("Warning: no pricing data found for %s", key)
+	c, err := az.GetConfig()
+	if err != nil {
+		return nil, fmt.Errorf("No default pricing data available")
+	}
+	return &Node{
+		VCPUCost:         c.CPU,
+		RAMCost:          c.RAM,
+		UsesBaseCPUPrice: true,
+	}, nil
 }
 }
 
 
 type azurePvKey struct {
 type azurePvKey struct {