diff --git a/pkg/providers/pricing/pricing.go b/pkg/providers/pricing/pricing.go index 3f15127840e9..7530cb66cfd7 100644 --- a/pkg/providers/pricing/pricing.go +++ b/pkg/providers/pricing/pricing.go @@ -210,6 +210,7 @@ func (p *Provider) UpdateOnDemandPricing(ctx context.Context) error { return &Err{error: errors.New("no on-demand pricing found"), lastUpdateTime: p.onDemandUpdateTime} } + // account for 28% compute savings plan for on-demand instances p.onDemandPrices = lo.Assign(onDemandPrices, onDemandMetalPrices) p.onDemandUpdateTime = time.Now() for instanceType, price := range p.onDemandPrices { @@ -218,7 +219,7 @@ func (p *Provider) UpdateOnDemandPricing(ctx context.Context) error { CapacityTypeLabel: ec2.UsageClassTypeOnDemand, RegionLabel: p.region, TopologyLabel: "", - }).Set(price) + }).Set(price* 0.72) } if p.cm.HasChanged("on-demand-prices", p.onDemandPrices) { logging.FromContext(ctx).With("instance-type-count", len(p.onDemandPrices)).Debugf("updated on-demand pricing")