instancetype

package
v0.4.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 23, 2024 License: Apache-2.0, Apache-2.0 Imports: 30 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MemoryAvailable        = "memory.available"
	DefaultMemoryAvailable = "750Mi"
)
View Source
const (
	InstanceTypesCacheKey = "types"
	InstanceTypesCacheTTL = 23 * time.Hour
)

Variables

View Source
var (
	RestrictedVMSizes = sets.New(
		"Standard_A0",
		"Standard_A1",
		"Standard_A1_v2",
		"Standard_B1s",
		"Standard_B1ms",
		"Standard_F1",
		"Standard_F1s",
		"Basic_A0",
		"Basic_A1",
		"Basic_A2",
		"Basic_A3",
		"Basic_A4",
	)
)

Functions

func EvictionThreshold

func EvictionThreshold() v1.ResourceList

func KubeReservedResources

func KubeReservedResources(vcpus int64, memoryGib float64) v1.ResourceList

func MaxEphemeralOSDiskSizeGB

func MaxEphemeralOSDiskSizeGB(sku *skewer.SKU) float64

MaxEphemeralOSDiskSizeGB returns the maximum ephemeral OS disk size for a given SKU. Ephemeral OS disk size is determined by the larger of the two values: 1. MaxResourceVolumeMB (Temp Disk Space) 2. MaxCachedDiskBytes (Cached Disk Space) For Ephemeral disk creation, CRP will use the larger of the two values to ensure we have enough space for the ephemeral disk. Note that generally only older SKUs use the Temp Disk space for ephemeral disks, and newer SKUs use the Cached Disk in most cases. The ephemeral OS disk is created with the free space of the larger of the two values in that place.

func NewInstanceType

func NewInstanceType(ctx context.Context, sku *skewer.SKU, vmsize *skewer.VMSizeType, kc *corev1beta1.KubeletConfiguration, region string,
	offerings cloudprovider.Offerings, nodeClass *v1alpha2.AKSNodeClass, architecture string) *cloudprovider.InstanceType

func SystemReservedResources

func SystemReservedResources() v1.ResourceList

Types

type Provider

type Provider struct {
	// contains filtered or unexported fields
}

func NewProvider

func NewProvider(region string, cache *cache.Cache, skuClient skuclient.SkuClient, pricingProvider *pricing.Provider, offeringsCache *kcache.UnavailableOfferings) *Provider

func (*Provider) List

Get all instance type options

func (*Provider) LivenessProbe

func (p *Provider) LivenessProbe(req *http.Request) error

type TaxBrackets

type TaxBrackets []struct {
	// UpperBound is the largest value this bracket is applied to.
	// The first bracket's lower bound is always 0.
	UpperBound float64

	// Rate is the percent rate of tax expressed as a float i.e. .5 for 50%.
	Rate float64
}

TaxBrackets implements a simple bracketed tax structure.

func (TaxBrackets) Calculate

func (t TaxBrackets) Calculate(amount float64) float64

Calculate expects Memory in Gi and CPU in cores.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL