Documentation ¶
Index ¶
- func BuildTags(name string, params infrav1.BuildParams) []*autoscaling.Tag
- func BuildTagsFromMap(asgName string, inTags map[string]string) []*autoscaling.Tag
- type Service
- func (s *Service) ASGIfExists(name *string) (*expinfrav1.AutoScalingGroup, error)
- func (s *Service) CanStartASGInstanceRefresh(scope *scope.MachinePoolScope) (bool, error)
- func (s *Service) CreateASG(scope *scope.MachinePoolScope) (*expinfrav1.AutoScalingGroup, error)
- func (s *Service) DeleteASG(name string) error
- func (s *Service) DeleteASGAndWait(name string) error
- func (s *Service) GetASGByName(scope *scope.MachinePoolScope) (*expinfrav1.AutoScalingGroup, error)
- func (s *Service) SDKToAutoScalingGroup(v *autoscaling.Group) (*expinfrav1.AutoScalingGroup, error)
- func (s *Service) StartASGInstanceRefresh(scope *scope.MachinePoolScope) error
- func (s *Service) UpdateASG(scope *scope.MachinePoolScope) error
- func (s *Service) UpdateResourceTags(resourceID *string, create, remove map[string]string) error
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)
func (*Service) CreateASG ¶
func (s *Service) CreateASG(scope *scope.MachinePoolScope) (*expinfrav1.AutoScalingGroup, error)
CreateASG runs an autoscaling group.
func (*Service) DeleteASGAndWait ¶
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
func (*Service) UpdateResourceTags ¶
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. |