Documentation ¶
Index ¶
- Constants
- Variables
- func ENILimitedPods(ctx context.Context, info ec2types.InstanceTypeInfo) *resource.Quantity
- func NewInstanceType(ctx context.Context, info ec2types.InstanceTypeInfo, region string, ...) *cloudprovider.InstanceType
- type DefaultProvider
- func (p *DefaultProvider) List(ctx context.Context, nodeClass *v1.EC2NodeClass) ([]*cloudprovider.InstanceType, error)
- func (p *DefaultProvider) Reset()
- func (p *DefaultProvider) UpdateInstanceTypeCapacityFromNode(ctx context.Context, node *corev1.Node, nodeClaim *karpv1.NodeClaim, ...) error
- func (p *DefaultProvider) UpdateInstanceTypeOfferings(ctx context.Context) error
- func (p *DefaultProvider) UpdateInstanceTypes(ctx context.Context) error
- type DefaultResolver
- type NetworkCard
- type Provider
- type Resolver
- type VPCLimits
- type ZoneData
Constants ¶
View Source
const ( MemoryAvailable = "memory.available" NodeFSAvailable = "nodefs.available" )
Variables ¶
View Source
var ( InstanceTypeVCPU = opmetrics.NewPrometheusGauge( crmetrics.Registry, prometheus.GaugeOpts{ Namespace: metrics.Namespace, Subsystem: cloudProviderSubsystem, Name: "instance_type_cpu_cores", Help: "VCPUs cores for a given instance type.", }, []string{ instanceTypeLabel, }, ) InstanceTypeMemory = opmetrics.NewPrometheusGauge( crmetrics.Registry, prometheus.GaugeOpts{ Namespace: metrics.Namespace, Subsystem: cloudProviderSubsystem, Name: "instance_type_memory_bytes", Help: "Memory, in bytes, for a given instance type.", }, []string{ instanceTypeLabel, }, ) InstanceTypeOfferingAvailable = opmetrics.NewPrometheusGauge( crmetrics.Registry, prometheus.GaugeOpts{ Namespace: metrics.Namespace, Subsystem: cloudProviderSubsystem, Name: "instance_type_offering_available", Help: "Instance type offering availability, based on instance type, capacity type, and zone", }, []string{ instanceTypeLabel, capacityTypeLabel, zoneLabel, }, ) InstanceTypeOfferingPriceEstimate = opmetrics.NewPrometheusGauge( crmetrics.Registry, prometheus.GaugeOpts{ Namespace: metrics.Namespace, Subsystem: cloudProviderSubsystem, Name: "instance_type_offering_price_estimate", Help: "Instance type offering estimated hourly price used when making informed decisions on node cost calculation, based on instance type, capacity type, and zone.", }, []string{ instanceTypeLabel, capacityTypeLabel, zoneLabel, }) )
View Source
var (
InstanceTypeBandwidthMegabits = map[string]int64{}/* 828 elements not displayed */
)
View Source
var Limits = map[string]*VPCLimits{}/* 840 elements not displayed */
VPC Limits and flags for ENI and IPv4 Addresses
Functions ¶
func ENILimitedPods ¶
func NewInstanceType ¶
func NewInstanceType(ctx context.Context, info ec2types.InstanceTypeInfo, region string, blockDeviceMappings []*v1.BlockDeviceMapping, instanceStorePolicy *v1.InstanceStorePolicy, maxPods *int32, podsPerCore *int32, kubeReserved map[string]string, systemReserved map[string]string, evictionHard map[string]string, evictionSoft map[string]string, amiFamilyType string, offerings cloudprovider.Offerings) *cloudprovider.InstanceType
Types ¶
type DefaultProvider ¶ added in v0.36.0
type DefaultProvider struct {
// contains filtered or unexported fields
}
func NewDefaultProvider ¶ added in v0.36.0
func (*DefaultProvider) List ¶ added in v0.36.0
func (p *DefaultProvider) List(ctx context.Context, nodeClass *v1.EC2NodeClass) ([]*cloudprovider.InstanceType, error)
func (*DefaultProvider) Reset ¶ added in v0.37.0
func (p *DefaultProvider) Reset()
func (*DefaultProvider) UpdateInstanceTypeCapacityFromNode ¶ added in v1.1.0
func (p *DefaultProvider) UpdateInstanceTypeCapacityFromNode(ctx context.Context, node *corev1.Node, nodeClaim *karpv1.NodeClaim, nodeClass *v1.EC2NodeClass) error
func (*DefaultProvider) UpdateInstanceTypeOfferings ¶ added in v0.37.0
func (p *DefaultProvider) UpdateInstanceTypeOfferings(ctx context.Context) error
func (*DefaultProvider) UpdateInstanceTypes ¶ added in v0.37.0
func (p *DefaultProvider) UpdateInstanceTypes(ctx context.Context) error
type DefaultResolver ¶ added in v1.1.0
type DefaultResolver struct {
// contains filtered or unexported fields
}
func NewDefaultResolver ¶ added in v1.1.0
func NewDefaultResolver(region string, pricingProvider pricing.Provider, unavailableOfferingsCache *awscache.UnavailableOfferings) *DefaultResolver
func (*DefaultResolver) CacheKey ¶ added in v1.1.0
func (d *DefaultResolver) CacheKey(nodeClass *v1.EC2NodeClass) string
func (*DefaultResolver) Resolve ¶ added in v1.1.0
func (d *DefaultResolver) Resolve(ctx context.Context, info ec2types.InstanceTypeInfo, zoneData []ZoneData, nodeClass *v1.EC2NodeClass) *cloudprovider.InstanceType
type NetworkCard ¶
type Provider ¶
type Provider interface {
List(context.Context, *v1.EC2NodeClass) ([]*cloudprovider.InstanceType, error)
}
type Resolver ¶ added in v1.1.0
type Resolver interface { // CacheKey tells the InstanceType cache if something changes about the InstanceTypes or Offerings based on the NodeClass. CacheKey(nodeClass *v1.EC2NodeClass) string // Resolve generates an InstanceType based on raw InstanceTypeInfo and NodeClass setting data Resolve(ctx context.Context, info ec2types.InstanceTypeInfo, zoneData []ZoneData, nodeClass *v1.EC2NodeClass) *cloudprovider.InstanceType }
Click to show internal directories.
Click to hide internal directories.