Documentation ¶
Index ¶
- Variables
- func BuildAwsCloudProvider(awsManager *AwsManager, discoveryOpts cloudprovider.NodeGroupDiscoveryOptions, ...) (cloudprovider.CloudProvider, error)
- type Asg
- func (asg *Asg) Autoprovisioned() bool
- func (asg *Asg) Belongs(node *apiv1.Node) (bool, error)
- func (asg *Asg) Create() error
- func (asg *Asg) Debug() string
- func (asg *Asg) DecreaseTargetSize(delta int) error
- func (asg *Asg) Delete() error
- func (asg *Asg) DeleteNodes(nodes []*apiv1.Node) error
- func (asg *Asg) Exist() bool
- func (asg *Asg) Id() string
- func (asg *Asg) IncreaseSize(delta int) error
- func (asg *Asg) MaxSize() int
- func (asg *Asg) MinSize() int
- func (asg *Asg) Nodes() ([]string, error)
- func (asg *Asg) TargetSize() (int, error)
- func (asg *Asg) TemplateNodeInfo() (*schedulercache.NodeInfo, error)
- type AwsManager
- func (m *AwsManager) Cleanup()
- func (m *AwsManager) DeleteInstances(instances []*AwsRef) error
- func (m *AwsManager) GetAsgForInstance(instance *AwsRef) (*Asg, error)
- func (m *AwsManager) GetAsgNodes(asg *Asg) ([]string, error)
- func (m *AwsManager) GetAsgSize(asgConfig *Asg) (int64, error)
- func (m *AwsManager) RegisterAsg(asg *Asg)
- func (m *AwsManager) SetAsgSize(asg *Asg, size int64) error
- type AwsRef
Constants ¶
This section is empty.
Variables ¶
var InstanceTypes = map[string]*instanceType{}/* 122 elements not displayed */
InstanceTypes is a map of ec2 resources
Functions ¶
func BuildAwsCloudProvider ¶
func BuildAwsCloudProvider(awsManager *AwsManager, discoveryOpts cloudprovider.NodeGroupDiscoveryOptions, resourceLimiter *cloudprovider.ResourceLimiter) (cloudprovider.CloudProvider, error)
BuildAwsCloudProvider builds CloudProvider implementation for AWS.
Types ¶
type Asg ¶
type Asg struct { AwsRef // contains filtered or unexported fields }
Asg implements NodeGroup interface.
func (*Asg) Autoprovisioned ¶
Autoprovisioned returns true if the node group is autoprovisioned.
func (*Asg) DecreaseTargetSize ¶
DecreaseTargetSize decreases the target size of the node group. This function doesn't permit to delete any existing node and can be used only to reduce the request for new nodes that have not been yet fulfilled. Delta should be negative. It is assumed that cloud provider will not delete the existing nodes if the size when there is an option to just decrease the target.
func (*Asg) Delete ¶
Delete deletes the node group on the cloud provider side. This will be executed only for autoprovisioned node groups, once their size drops to 0.
func (*Asg) DeleteNodes ¶
DeleteNodes deletes the nodes from the group.
func (*Asg) Exist ¶
Exist checks if the node group really exists on the cloud provider side. Allows to tell the theoretical node group from the real one.
func (*Asg) IncreaseSize ¶
IncreaseSize increases Asg size
func (*Asg) TargetSize ¶
TargetSize returns the current TARGET size of the node group. It is possible that the number is different from the number of nodes registered in Kubernetes.
func (*Asg) TemplateNodeInfo ¶
func (asg *Asg) TemplateNodeInfo() (*schedulercache.NodeInfo, error)
TemplateNodeInfo returns a node template for this node group.
type AwsManager ¶
type AwsManager struct {
// contains filtered or unexported fields
}
AwsManager is handles aws communication and data caching.
func CreateAwsManager ¶
func CreateAwsManager(configReader io.Reader) (*AwsManager, error)
CreateAwsManager constructs awsManager object.
func (*AwsManager) Cleanup ¶
func (m *AwsManager) Cleanup()
Cleanup closes the channel to signal the go routine to stop that is handling the cache
func (*AwsManager) DeleteInstances ¶
func (m *AwsManager) DeleteInstances(instances []*AwsRef) error
DeleteInstances deletes the given instances. All instances must be controlled by the same ASG.
func (*AwsManager) GetAsgForInstance ¶
func (m *AwsManager) GetAsgForInstance(instance *AwsRef) (*Asg, error)
GetAsgForInstance returns AsgConfig of the given Instance
func (*AwsManager) GetAsgNodes ¶
func (m *AwsManager) GetAsgNodes(asg *Asg) ([]string, error)
GetAsgNodes returns Asg nodes.
func (*AwsManager) GetAsgSize ¶
func (m *AwsManager) GetAsgSize(asgConfig *Asg) (int64, error)
GetAsgSize gets ASG size.
func (*AwsManager) RegisterAsg ¶
func (m *AwsManager) RegisterAsg(asg *Asg)
RegisterAsg registers asg in Aws Manager.
func (*AwsManager) SetAsgSize ¶
func (m *AwsManager) SetAsgSize(asg *Asg, size int64) error
SetAsgSize sets ASG size.
type AwsRef ¶
type AwsRef struct {
Name string
}
AwsRef contains a reference to some entity in AWS/GKE world.
func AwsRefFromProviderId ¶
AwsRefFromProviderId creates InstanceConfig object from provider id which must be in format: aws:///zone/name