Documentation ¶
Index ¶
- Constants
- func ValidateAndRoundResources(mCPU int64, memory int64, storage int64) (int64, int64, int64)
- type PriceList
- type PricingService
- func (service *PricingService) CalculatePricing(cpu int64, memory int64, storage int64, class cluster.ComputeClass, spot bool) float64
- func (service *PricingService) DecideComputeClass(workloadName string, mCPU int64, memory int64, arm64 bool) cluster.ComputeClass
- func (service *PricingService) PopulateWorkloads(nodes map[string]cluster.Node) ([]cluster.Workload, error)
Constants ¶
View Source
const ARM_TYPE_PREFIX = "t2a-"
View Source
const CLUSTER_FEE = 0.1
Variables ¶
This section is empty.
Functions ¶
Types ¶
type PriceList ¶
type PriceList struct { // generic for all Region string StoragePrice float64 // regular pricing CpuPrice float64 MemoryPrice float64 CpuBalancedPrice float64 MemoryBalancedPrice float64 CpuScaleoutPrice float64 MemoryScaleoutPrice float64 CpuArmScaleoutPrice float64 MemoryArmScaleoutPrice float64 // spot pricing SpotCpuPrice float64 SpotMemoryPrice float64 SpotCpuBalancedPrice float64 SpotMemoryBalancedPrice float64 SpotCpuScaleoutPrice float64 SpotMemoryScaleoutPrice float64 SpotArmCpuScaleoutPrice float64 SpotArmMemoryScaleoutPrice float64 }
type PricingService ¶
type PricingService struct { Pricing PriceList Config *ini.File // contains filtered or unexported fields }
func NewService ¶
func NewService(sku string, region string, clientset *kubernetes.Clientset, metricsClientset *metricsv.Clientset, config *ini.File) (*PricingService, error)
func (*PricingService) CalculatePricing ¶
func (service *PricingService) CalculatePricing(cpu int64, memory int64, storage int64, class cluster.ComputeClass, spot bool) float64
func (*PricingService) DecideComputeClass ¶
func (service *PricingService) DecideComputeClass(workloadName string, mCPU int64, memory int64, arm64 bool) cluster.ComputeClass
func (*PricingService) PopulateWorkloads ¶
Click to show internal directories.
Click to hide internal directories.