Documentation ¶
Index ¶
- func BuildAwsCloudProvider(awsManager *AwsManager, discoveryOpts cloudprovider.NodeGroupDiscoveryOptions) (cloudprovider.CloudProvider, error)
- type Asg
- func (asg *Asg) Belongs(node *apiv1.Node) (bool, error)
- func (asg *Asg) Debug() string
- func (asg *Asg) DecreaseTargetSize(delta int) error
- func (asg *Asg) DeleteNodes(nodes []*apiv1.Node) error
- 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) 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 ¶
This section is empty.
Functions ¶
func BuildAwsCloudProvider ¶
func BuildAwsCloudProvider(awsManager *AwsManager, discoveryOpts cloudprovider.NodeGroupDiscoveryOptions) (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) 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) DeleteNodes ¶
DeleteNodes deletes the nodes from the group.
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 Kuberentes.
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) 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