asg

package
v0.7.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 16, 2021 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BuildTags

func BuildTags(name string, params infrav1.BuildParams) []*autoscaling.Tag

BuildTags takes the tag configuration from the resources and returns a slice of autoscaling Tags usable in autoscaling API calls.

func BuildTagsFromMap

func BuildTagsFromMap(asgName string, inTags map[string]string) []*autoscaling.Tag

BuildTagsFromMap takes a map of keys and values and returns them as autoscaling group tags.

Types

type Service

type Service struct {
	ASGClient autoscalingiface.AutoScalingAPI
	// contains filtered or unexported fields
}

Service holds a collection of interfaces. The interfaces are broken down like this to group functions together. One alternative is to have a large list of functions from the asg client.

func NewService

func NewService(clusterScope cloud.ClusterScoper) *Service

NewService returns a new service given the asg api client.

func (*Service) ASGIfExists

func (s *Service) ASGIfExists(name *string) (*expinfrav1.AutoScalingGroup, error)

ASGIfExists returns the existing autoscaling group or nothing if it doesn't exist.

func (*Service) CanStartASGInstanceRefresh added in v0.6.4

func (s *Service) CanStartASGInstanceRefresh(scope *scope.MachinePoolScope) (bool, error)

CanStartASGInstanceRefresh will start an ASG instance with refresh.

func (*Service) CreateASG

CreateASG runs an autoscaling group.

func (*Service) DeleteASG

func (s *Service) DeleteASG(name string) error

DeleteASG will delete the ASG of a service.

func (*Service) DeleteASGAndWait

func (s *Service) DeleteASGAndWait(name string) error

DeleteASGAndWait will delete an ASG and wait until it is deleted.

func (*Service) GetASGByName

func (s *Service) GetASGByName(scope *scope.MachinePoolScope) (*expinfrav1.AutoScalingGroup, error)

GetASGByName returns the existing ASG or nothing if it doesn't exist.

func (*Service) SDKToAutoScalingGroup

func (s *Service) SDKToAutoScalingGroup(v *autoscaling.Group) (*expinfrav1.AutoScalingGroup, error)

SDKToAutoScalingGroup converts an AWS EC2 SDK AutoScalingGroup to the CAPA AutoScalingGroup type.

func (*Service) StartASGInstanceRefresh added in v0.6.4

func (s *Service) StartASGInstanceRefresh(scope *scope.MachinePoolScope) error

StartASGInstanceRefresh will start an ASG instance with refresh.

func (*Service) UpdateASG

func (s *Service) UpdateASG(scope *scope.MachinePoolScope) error

UpdateASG will update the ASG of a service.

func (*Service) UpdateResourceTags

func (s *Service) UpdateResourceTags(resourceID *string, create, remove map[string]string) error

UpdateResourceTags updates the tags for an autoscaling group. This will be called if there is anything to create (update) or delete. We may not always have to perform each action, so we check what we're receiving to avoid calling AWS if we don't need to.

Directories

Path Synopsis
Package mock_autoscalingiface is a generated GoMock package.
Package mock_autoscalingiface is a generated GoMock package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL