aws

package
v1.4.0 Latest Latest
Warning

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

Go to latest
Published: Feb 8, 2024 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AmiUpdate

func AmiUpdate(region, cluster, nodegroup string, dryrun bool, ctx context.Context) error

func Ec2ClientSetup

func Ec2ClientSetup() (*ec2.EC2, error)

func EksClientSetup

func EksClientSetup(awsRegion string) (*eks.EKS, error)

func GetClusters

func GetClusters(region string, awsEks EKS, ctx context.Context) ([]string, error)

func GetLatestAmiWithinEc2 added in v1.4.0

func GetLatestAmiWithinEc2(amiVersion string, awsEc2 Ec2, ctx context.Context) (*string, error)

func GetLatestAmiWithinSsm added in v1.4.0

func GetLatestAmiWithinSsm(amiType, amiVersion, region string, awsSsm SSM, awsEc2 Ec2, ctx context.Context) (time.Time, *string, error)

func GetNodegroupDescription

func GetNodegroupDescription(nodegroup NodeGroup, awsEks EKS, ctx context.Context) (eks.DescribeNodegroupOutput, error)

func GetNodegroupsFromCluster

func GetNodegroupsFromCluster(clusterName, region string, awsEks EKS, ctx context.Context) ([]string, error)

func GetRegionsToCheck

func GetRegionsToCheck(regionsVar []string, awsEc2 Ec2, ctx context.Context) ([]string, error)

func HasNodegroupTag

func HasNodegroupTag(tag string, nodegroupTags map[string]*string, ctx context.Context) (bool, error)

func IsLastAmiOldEnough

func IsLastAmiOldEnough(skipNewerThan uint, nodegroup NodeGroup, today time.Time, ngAmiType, ngAmiVersion string, awsSsm SSM, awsEc2 Ec2, ctx context.Context) (bool, error)

func IsTheSameAmiVersion added in v1.4.0

func IsTheSameAmiVersion(nodegroup NodeGroup, ngAmiType, ngAmiVersion, ngAmiReleaseVersion string, awsSsm SSM, awsEc2 Ec2, ctx context.Context) (bool, error)

func SsmClientSetup

func SsmClientSetup(awsRegion string) (*ssm.SSM, error)

Types

type EKS

type EKS interface {
	ListClusters(input *eks.ListClustersInput) (*eks.ListClustersOutput, error)
	ListNodegroups(input *eks.ListNodegroupsInput) (*eks.ListNodegroupsOutput, error)
	DescribeNodegroup(input *eks.DescribeNodegroupInput) (*eks.DescribeNodegroupOutput, error)
}

type Ec2

type Ec2 interface {
	DescribeRegions(input *ec2.DescribeRegionsInput) (*ec2.DescribeRegionsOutput, error)
	DescribeImages(input *ec2.DescribeImagesInput) (*ec2.DescribeImagesOutput, error)
}

type NodeGroup

type NodeGroup struct {
	Region        string
	ClusterName   string
	NodegroupName string
}

func GetNodegroupsFromRegion

func GetNodegroupsFromRegion(region string, ctx context.Context) ([]NodeGroup, error)

type RealEc2

type RealEc2 struct {
	Svc *ec2.EC2
}

func (RealEc2) DescribeImages added in v1.4.0

func (t RealEc2) DescribeImages(input *ec2.DescribeImagesInput) (*ec2.DescribeImagesOutput, error)

func (RealEc2) DescribeRegions

func (t RealEc2) DescribeRegions(input *ec2.DescribeRegionsInput) (*ec2.DescribeRegionsOutput, error)

type RealEks

type RealEks struct {
	Svc *eks.EKS
}

func (RealEks) DescribeNodegroup

func (t RealEks) DescribeNodegroup(input *eks.DescribeNodegroupInput) (*eks.DescribeNodegroupOutput, error)

func (RealEks) ListClusters

func (t RealEks) ListClusters(input *eks.ListClustersInput) (*eks.ListClustersOutput, error)

func (RealEks) ListNodegroups

func (t RealEks) ListNodegroups(input *eks.ListNodegroupsInput) (*eks.ListNodegroupsOutput, error)

type RealSsm

type RealSsm struct {
	Svc *ssm.SSM
}

func (RealSsm) GetParameter

func (t RealSsm) GetParameter(input *ssm.GetParameterInput) (*ssm.GetParameterOutput, error)

type SSM

type SSM interface {
	GetParameter(input *ssm.GetParameterInput) (*ssm.GetParameterOutput, error)
}

Jump to

Keyboard shortcuts

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