Documentation ¶
Index ¶
- type Asg
- func (asg *Asg) Belongs(node *apiv1.Node) (bool, error)
- func (asg *Asg) Debug() string
- 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)
- type AwsCloudProvider
- 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 ¶
This section is empty.
Types ¶
type Asg ¶
type Asg struct { AwsRef // contains filtered or unexported fields }
Asg implements NodeGroup interfrace.
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.
type AwsCloudProvider ¶
type AwsCloudProvider struct {
// contains filtered or unexported fields
}
AwsCloudProvider implements CloudProvider interface.
func BuildAwsCloudProvider ¶
func BuildAwsCloudProvider(awsManager *AwsManager, specs []string) (*AwsCloudProvider, error)
BuildAwsCloudProvider builds CloudProvider implementation for AWS.
func (*AwsCloudProvider) Name ¶
func (aws *AwsCloudProvider) Name() string
Name returns name of the cloud provider.
func (*AwsCloudProvider) NodeGroupForNode ¶
func (aws *AwsCloudProvider) NodeGroupForNode(node *apiv1.Node) (cloudprovider.NodeGroup, error)
NodeGroupForNode returns the node group for the given node.
func (*AwsCloudProvider) NodeGroups ¶
func (aws *AwsCloudProvider) NodeGroups() []cloudprovider.NodeGroup
NodeGroups returns all node groups configured for this cloud provider.
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