Documentation
¶
Index ¶
- Constants
- Variables
- func CalculateMemoryWithoutOverhead(vmMemoryOverheadPercent float64, skuMemoryGiB float64) *resource.Quantity
- func EvictionThreshold() corev1.ResourceList
- func FindMaxEphemeralSizeGBAndPlacement(sku *skewer.SKU) (sizeGB int64, placement *armcompute.DiffDiskPlacement)
- func GetKarpenterWorkingSKUs() []skewer.SKU
- func KubeReservedResources(vcpus int64, memoryGib float64) corev1.ResourceList
- func NewInstanceType(ctx context.Context, sku *skewer.SKU, vmsize *skewer.VMSizeType, ...) *cloudprovider.InstanceType
- func SystemReservedResources() corev1.ResourceList
- func UseEphemeralDisk(sku *skewer.SKU, nodeClass *v1beta1.AKSNodeClass) bool
- type DefaultProvider
- func (p *DefaultProvider) Get(ctx context.Context, nodeClass *v1beta1.AKSNodeClass, instanceType string) (*skewer.SKU, error)
- func (p *DefaultProvider) List(ctx context.Context, nodeClass *v1beta1.AKSNodeClass) ([]*cloudprovider.InstanceType, error)
- func (p *DefaultProvider) LivenessProbe(req *http.Request) error
- type Provider
- type TaxBrackets
Constants ¶
View Source
const ( MemoryAvailable = "memory.available" DefaultMemoryAvailable = "750Mi" )
View Source
const ( InstanceTypesCacheKey = "types" InstanceTypesCacheTTL = 23 * time.Hour )
Variables ¶
View Source
var ( // AKSRestrictedVMSizes are low-performance VM sizes // that are not allowed for use in AKS node pools. AKSRestrictedVMSizes = 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 CalculateMemoryWithoutOverhead ¶ added in v0.6.1
func EvictionThreshold ¶
func EvictionThreshold() corev1.ResourceList
func FindMaxEphemeralSizeGBAndPlacement ¶ added in v1.5.2
func FindMaxEphemeralSizeGBAndPlacement(sku *skewer.SKU) (sizeGB int64, placement *armcompute.DiffDiskPlacement)
func GetKarpenterWorkingSKUs ¶ added in v1.4.0
GetKarpenterWorkingSKUs returns a the list of SKUs that are allowed to be used by Karpenter. This is a subset of the SKUs that are available in Azure.
func KubeReservedResources ¶
func KubeReservedResources(vcpus int64, memoryGib float64) corev1.ResourceList
func NewInstanceType ¶
func NewInstanceType( ctx context.Context, sku *skewer.SKU, vmsize *skewer.VMSizeType, kc *v1beta1.KubeletConfiguration, region string, offerings cloudprovider.Offerings, nodeClass *v1beta1.AKSNodeClass, architecture string, ) *cloudprovider.InstanceType
func SystemReservedResources ¶
func SystemReservedResources() corev1.ResourceList
func UseEphemeralDisk ¶ added in v1.5.2
func UseEphemeralDisk(sku *skewer.SKU, nodeClass *v1beta1.AKSNodeClass) bool
Types ¶
type DefaultProvider ¶ added in v0.7.0
type DefaultProvider struct {
// contains filtered or unexported fields
}
func NewDefaultProvider ¶ added in v0.7.0
func NewDefaultProvider( region string, cache *cache.Cache, skuClient skewer.ResourceClient, pricingProvider *pricing.Provider, offeringsCache *kcache.UnavailableOfferings, ) *DefaultProvider
func (*DefaultProvider) Get ¶ added in v1.5.2
func (p *DefaultProvider) Get(ctx context.Context, nodeClass *v1beta1.AKSNodeClass, instanceType string) (*skewer.SKU, error)
func (*DefaultProvider) List ¶ added in v0.7.0
func (p *DefaultProvider) List( ctx context.Context, nodeClass *v1beta1.AKSNodeClass) ([]*cloudprovider.InstanceType, error)
Get all instance type options
func (*DefaultProvider) LivenessProbe ¶ added in v0.7.0
func (p *DefaultProvider) LivenessProbe(req *http.Request) error
type Provider ¶
type Provider interface {
LivenessProbe(*http.Request) error
List(context.Context, *v1beta1.AKSNodeClass) ([]*cloudprovider.InstanceType, error)
// Return Azure Skewer Representation of the instance type
Get(context.Context, *v1beta1.AKSNodeClass, string) (*skewer.SKU, 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.
Click to show internal directories.
Click to hide internal directories.