Documentation ¶
Index ¶
- Constants
- type AMIProvider
- type CloudProvider
- func (c *CloudProvider) Create(ctx context.Context, constraints *v1alpha5.Constraints, ...) chan error
- func (c *CloudProvider) Default(ctx context.Context, constraints *v1alpha5.Constraints)
- func (c *CloudProvider) Delete(ctx context.Context, node *v1.Node) error
- func (c *CloudProvider) GetInstanceTypes(ctx context.Context, constraints *v1alpha5.Constraints) ([]cloudprovider.InstanceType, error)
- func (c *CloudProvider) Validate(ctx context.Context, constraints *v1alpha5.Constraints) *apis.FieldError
- type InstanceProvider
- type InstanceType
- func (i *InstanceType) AMDGPUs() *resource.Quantity
- func (i *InstanceType) AWSNeurons() *resource.Quantity
- func (i *InstanceType) Architecture() string
- func (i *InstanceType) CPU() *resource.Quantity
- func (i *InstanceType) Memory() *resource.Quantity
- func (i *InstanceType) Name() string
- func (i *InstanceType) NvidiaGPUs() *resource.Quantity
- func (i *InstanceType) Offerings() []cloudprovider.Offering
- func (i *InstanceType) Overhead() v1.ResourceList
- func (i *InstanceType) Pods() *resource.Quantity
- type InstanceTypeProvider
- type LaunchTemplateProvider
- type SecurityGroupProvider
- type SubnetProvider
Constants ¶
const ( // CreationQPS limits the number of requests per second to CreateFleet // https://docs.aws.amazon.com/AWSEC2/latest/APIReference/throttling.html#throttling-limits CreationQPS = 2 // CreationBurst limits the additional burst requests. // https://docs.aws.amazon.com/AWSEC2/latest/APIReference/throttling.html#throttling-limits CreationBurst = 100 // CacheTTL restricts QPS to AWS APIs to this interval for verifying setup // resources. This value represents the maximum eventual consistency between // AWS actual state and the controller's ability to provision those // resources. Cache hits enable faster provisioning and reduced API load on // AWS APIs, which can have a serious impact on performance and scalability. // DO NOT CHANGE THIS VALUE WITHOUT DUE CONSIDERATION CacheTTL = 60 * time.Second // CacheCleanupInterval triggers cache cleanup (lazy eviction) at this interval. CacheCleanupInterval = 10 * time.Minute )
const EC2VMAvailableMemoryFactor = .925
EC2VMAvailableMemoryFactor assumes the EC2 VM will consume <7.25% of the memory of a given machine
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AMIProvider ¶ added in v0.2.7
type AMIProvider struct {
// contains filtered or unexported fields
}
func NewAMIProvider ¶ added in v0.2.7
func NewAMIProvider(ssm ssmiface.SSMAPI, clientSet *kubernetes.Clientset) *AMIProvider
func (*AMIProvider) Get ¶ added in v0.2.7
func (p *AMIProvider) Get(ctx context.Context, instanceTypes []cloudprovider.InstanceType) (map[string][]cloudprovider.InstanceType, error)
Get returns a set of AMIIDs and corresponding instance types. AMI may vary due to architecture, acclerator, etc
type CloudProvider ¶ added in v0.2.7
type CloudProvider struct {
// contains filtered or unexported fields
}
func NewCloudProvider ¶ added in v0.2.7
func NewCloudProvider(ctx context.Context, options cloudprovider.Options) *CloudProvider
func (*CloudProvider) Create ¶ added in v0.2.7
func (c *CloudProvider) Create(ctx context.Context, constraints *v1alpha5.Constraints, instanceTypes []cloudprovider.InstanceType, quantity int, callback func(*v1.Node) error) chan error
Create a node given the constraints.
func (*CloudProvider) Default ¶ added in v0.3.4
func (c *CloudProvider) Default(ctx context.Context, constraints *v1alpha5.Constraints)
Default the provisioner
func (*CloudProvider) GetInstanceTypes ¶ added in v0.2.7
func (c *CloudProvider) GetInstanceTypes(ctx context.Context, constraints *v1alpha5.Constraints) ([]cloudprovider.InstanceType, error)
func (*CloudProvider) Validate ¶ added in v0.2.7
func (c *CloudProvider) Validate(ctx context.Context, constraints *v1alpha5.Constraints) *apis.FieldError
Validate the provisioner
type InstanceProvider ¶ added in v0.1.3
type InstanceProvider struct {
// contains filtered or unexported fields
}
func (*InstanceProvider) Create ¶ added in v0.1.3
func (p *InstanceProvider) Create(ctx context.Context, constraints *v1alpha1.Constraints, instanceTypes []cloudprovider.InstanceType, quantity int) ([]*v1.Node, error)
Create an instance given the constraints. instanceTypes should be sorted by priority for spot capacity type. If spot is not used, the instanceTypes are not required to be sorted because we are using ec2 fleet's lowest-price OD allocation strategy
type InstanceType ¶ added in v0.2.2
type InstanceType struct { ec2.InstanceTypeInfo AvailableOfferings []cloudprovider.Offering }
func (*InstanceType) AMDGPUs ¶ added in v0.2.5
func (i *InstanceType) AMDGPUs() *resource.Quantity
func (*InstanceType) AWSNeurons ¶ added in v0.2.2
func (i *InstanceType) AWSNeurons() *resource.Quantity
func (*InstanceType) Architecture ¶ added in v0.3.4
func (i *InstanceType) Architecture() string
func (*InstanceType) CPU ¶ added in v0.2.2
func (i *InstanceType) CPU() *resource.Quantity
func (*InstanceType) Memory ¶ added in v0.2.2
func (i *InstanceType) Memory() *resource.Quantity
func (*InstanceType) Name ¶ added in v0.2.2
func (i *InstanceType) Name() string
func (*InstanceType) NvidiaGPUs ¶ added in v0.2.2
func (i *InstanceType) NvidiaGPUs() *resource.Quantity
func (*InstanceType) Offerings ¶ added in v0.4.3
func (i *InstanceType) Offerings() []cloudprovider.Offering
func (*InstanceType) Overhead ¶ added in v0.2.2
func (i *InstanceType) Overhead() v1.ResourceList
Overhead computes overhead for https://kubernetes.io/docs/tasks/administer-cluster/reserve-compute-resources/#node-allocatable using calculations copied from https://github.com/bottlerocket-os/bottlerocket#kubernetes-settings
func (*InstanceType) Pods ¶ added in v0.2.2
func (i *InstanceType) Pods() *resource.Quantity
type InstanceTypeProvider ¶ added in v0.2.0
type InstanceTypeProvider struct {
// contains filtered or unexported fields
}
func NewInstanceTypeProvider ¶ added in v0.2.0
func NewInstanceTypeProvider(ec2api ec2iface.EC2API, subnetProvider *SubnetProvider) *InstanceTypeProvider
func (*InstanceTypeProvider) Get ¶ added in v0.2.0
func (p *InstanceTypeProvider) Get(ctx context.Context, constraints *v1alpha1.Constraints) ([]cloudprovider.InstanceType, error)
Get instance type options given the constraints
type LaunchTemplateProvider ¶ added in v0.1.3
func NewLaunchTemplateProvider ¶ added in v0.2.7
func NewLaunchTemplateProvider(ec2api ec2iface.EC2API, amiProvider *AMIProvider, securityGroupProvider *SecurityGroupProvider) *LaunchTemplateProvider
func (*LaunchTemplateProvider) Get ¶ added in v0.1.3
func (p *LaunchTemplateProvider) Get(ctx context.Context, constraints *v1alpha1.Constraints, instanceTypes []cloudprovider.InstanceType, additionalLabels map[string]string) (map[string][]cloudprovider.InstanceType, error)
func (*LaunchTemplateProvider) GetCABundle ¶ added in v0.3.4
func (p *LaunchTemplateProvider) GetCABundle(ctx context.Context) (*string, error)
type SecurityGroupProvider ¶ added in v0.1.3
type SecurityGroupProvider struct {
// contains filtered or unexported fields
}
func NewSecurityGroupProvider ¶ added in v0.1.3
func NewSecurityGroupProvider(ec2api ec2iface.EC2API) *SecurityGroupProvider
func (*SecurityGroupProvider) Get ¶ added in v0.1.3
func (s *SecurityGroupProvider) Get(ctx context.Context, constraints *v1alpha1.Constraints) ([]string, error)
type SubnetProvider ¶ added in v0.1.3
type SubnetProvider struct {
// contains filtered or unexported fields
}
func NewSubnetProvider ¶ added in v0.1.3
func NewSubnetProvider(ec2api ec2iface.EC2API) *SubnetProvider
func (*SubnetProvider) Get ¶ added in v0.1.3
func (s *SubnetProvider) Get(ctx context.Context, constraints *v1alpha1.Constraints) ([]*ec2.Subnet, error)