amazon

package
v1.3.1119 Latest Latest
Warning

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

Go to latest
Published: Apr 15, 2019 License: Apache-2.0 Imports: 22 Imported by: 4

Documentation

Index

Constants

View Source
const DefaultRegion = "us-west-2"

Variables

This section is empty.

Functions

func AvailabilityZones

func AvailabilityZones() ([]string, error)

func CleanUpObsoleteEksClusterStack

func CleanUpObsoleteEksClusterStack(clusterName string, profile string, region string) error

CleanUpObsoleteEksClusterStack removes dead eksctl CloudFormation stack associated with given EKS cluster name.

func CreateS3Bucket

func CreateS3Bucket(bucketName string, profile string, region string) (string, error)

CreateS3Bucket creates a new S3 bucket in the default region with the given bucket name returning the location string

func EksClusterExists

func EksClusterExists(clusterName string, profile string, region string) (bool, error)

EksClusterExists checks if EKS cluster with given name exists in given region.

func EksClusterObsoleteStackExists

func EksClusterObsoleteStackExists(clusterName string, profile string, region string) (bool, error)

EksClusterObsoleteStackExists detects if there is obsolete CloudFormation stack for given EKS cluster.

If EKS cluster creation process is interrupted, there will be CloudFormation stack in ROLLBACK_COMPLETE state left. Such dead stack prevents eksctl from creating cluster with the same name. This is common activity then to remove stacks like this and this function performs this action.

func EksctlStackName

func EksctlStackName(clusterName string) string

EksctlStackName generates CloudFormation stack name for given EKS cluster name. This function follows eksctl naming convention.

func GetAccountIDAndRegion

func GetAccountIDAndRegion(profile string, region string) (string, string, error)

GetAccountIDAndRegion returns the current account ID and region

func GetContainerRegistryHost

func GetContainerRegistryHost() (string, error)

GetContainerRegistryHost

func GetRegionFromContainerRegistryHost

func GetRegionFromContainerRegistryHost(kubeClient kubernetes.Interface, namespace string, dockerRegistry string) string

Deprecated!

This function is kept for backwards compatibility. AWS region should not be resolved from ECR address, but read from ConfigMap (see RememberRegion function). To keep backwards compatibility with existing installations this function will be kept for a while and it will perform migration to config map. Eventually it will be removed from a codebase.

func LazyCreateRegistry

func LazyCreateRegistry(kube kubernetes.Interface, namespace string, region string, dockerRegistry string, orgName string, appName string) error

LazyCreateRegistry lazily creates the ECR registry if it does not already exist

func NewAwsSession

func NewAwsSession(profileOption string, regionOption string) (*session.Session, error)

func NewAwsSessionWithoutOptions

func NewAwsSessionWithoutOptions() (*session.Session, error)

func RegisterAwsCustomDomain

func RegisterAwsCustomDomain(customDomain string, elbAddress string) error

RegisterAwsCustomDomain registers a wildcard ALIAS for the custom domain to point at the given ELB host name

func ResolveRegion

func ResolveRegion(profileOption string, regionOption string) (string, error)

func ResolveRegionWithoutOptions

func ResolveRegionWithoutOptions() (string, error)

func UserHomeDir

func UserHomeDir() string

UserHomeDir returns the home directory for the user the process is running under. This is a copy of shareddefaults.UserHomeDir in the internal AWS package. We can't user user.Current().HomeDir as we want to override this during testing. :-|

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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