scaling

package
v0.0.0-...-162ddea Latest Latest
Warning

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

Go to latest
Published: Dec 1, 2023 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	DefaultConfigVersionRetention int = 2
)
View Source
var (
	DefaultTemplateVersionRetention int = 10
)

Functions

func ConvertToLaunchConfiguration

func ConvertToLaunchConfiguration(resource interface{}) *autoscaling.LaunchConfiguration

func ConvertToLaunchTemplate

func ConvertToLaunchTemplate(resource interface{}) *ec2.LaunchTemplate

Types

type Configuration

type Configuration interface {
	Name() string
	Resource() interface{}
	Create(input *CreateConfigurationInput) error
	Delete(input *DeleteConfigurationInput) error
	Discover(input *DiscoverConfigurationInput) error
	Drifted(input *CreateConfigurationInput) bool
	RotationNeeded(input *DiscoverConfigurationInput) bool
	Provisioned() bool
}

type CreateConfigurationInput

type CreateConfigurationInput struct {
	Name                  string
	IamInstanceProfileArn string
	ImageId               string
	InstanceType          string
	KeyName               string
	SecurityGroups        []string
	Volumes               []v1alpha1.NodeVolume
	UserData              string
	SpotPrice             string
	LicenseSpecifications []string
	Placement             *v1alpha1.PlacementSpec
	MetadataOptions       *v1alpha1.MetadataOptions
}

type DeleteConfigurationInput

type DeleteConfigurationInput struct {
	Name           string
	Prefix         string
	DeleteAll      bool
	RetainVersions int
}

type DiscoverConfigurationInput

type DiscoverConfigurationInput struct {
	ScalingGroup     *autoscaling.Group
	TargetConfigName string
}

type LaunchConfiguration

type LaunchConfiguration struct {
	awsprovider.AwsWorker
	OwnerName      string
	TargetResource *autoscaling.LaunchConfiguration
	ResourceList   []*autoscaling.LaunchConfiguration
}

func NewLaunchConfiguration

func NewLaunchConfiguration(ownerName string, w awsprovider.AwsWorker, input *DiscoverConfigurationInput) (*LaunchConfiguration, error)

func (*LaunchConfiguration) Create

func (*LaunchConfiguration) Delete

func (*LaunchConfiguration) Discover

func (*LaunchConfiguration) Drifted

func (*LaunchConfiguration) Name

func (lc *LaunchConfiguration) Name() string

func (*LaunchConfiguration) Provisioned

func (lc *LaunchConfiguration) Provisioned() bool

func (*LaunchConfiguration) Resource

func (lc *LaunchConfiguration) Resource() interface{}

func (*LaunchConfiguration) RotationNeeded

func (lc *LaunchConfiguration) RotationNeeded(input *DiscoverConfigurationInput) bool

type LaunchTemplate

type LaunchTemplate struct {
	awsprovider.AwsWorker
	OwnerName      string
	TargetResource *ec2.LaunchTemplate
	TargetVersions []*ec2.LaunchTemplateVersion
	LatestVersion  *ec2.LaunchTemplateVersion
	ResourceList   []*ec2.LaunchTemplate
}

func NewLaunchTemplate

func NewLaunchTemplate(ownerName string, w awsprovider.AwsWorker, input *DiscoverConfigurationInput) (*LaunchTemplate, error)

func (*LaunchTemplate) Create

func (lt *LaunchTemplate) Create(input *CreateConfigurationInput) error

func (*LaunchTemplate) Delete

func (lt *LaunchTemplate) Delete(input *DeleteConfigurationInput) error

func (*LaunchTemplate) Discover

func (lt *LaunchTemplate) Discover(input *DiscoverConfigurationInput) error

func (*LaunchTemplate) Drifted

func (lt *LaunchTemplate) Drifted(input *CreateConfigurationInput) bool

func (*LaunchTemplate) Name

func (lt *LaunchTemplate) Name() string

func (*LaunchTemplate) Provisioned

func (lt *LaunchTemplate) Provisioned() bool

func (*LaunchTemplate) Resource

func (lt *LaunchTemplate) Resource() interface{}

func (*LaunchTemplate) RotationNeeded

func (lt *LaunchTemplate) RotationNeeded(input *DiscoverConfigurationInput) bool

Jump to

Keyboard shortcuts

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