eks

package
v2.1.59 Latest Latest
Warning

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

Go to latest
Published: Jun 5, 2020 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EksctlStackName

func EksctlStackName(clusterName string) string

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

func NewEKSAPIHandler

func NewEKSAPIHandler(awsSession client.ConfigProvider, eksapi ...eksiface.EKSAPI) (*eksAPIHandler, error)

NewEKSAPIHandler will return an eksAPIHandler with configured credentials

Types

type EKSer

type EKSer interface {
	// EksClusterExists returns whether a cluster exists
	EksClusterExists(clusterName string, profile string, region string) (bool, error)

	// DescribeCluster describes a cluster and returns an internal cluster.Cluster representation
	DescribeCluster(clusterName string) (*cluster.Cluster, string, error)

	// ListClusters returns a list of clusters in the AWS account
	ListClusters() ([]*cluster.Cluster, error)

	// GetClusterAsEKSCluster returns a cluster as eks.Cluster with extra information
	GetClusterAsEKSCluster(clusterName string) (*eks.Cluster, error)

	// AddTagsToCluster adds the given tags to a cluster
	AddTagsToCluster(clusterName string, tags map[string]*string) 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.
	EksClusterObsoleteStackExists(clusterName string, profile string, region string) (bool, error)

	// CleanUpObsoleteEksClusterStack removes dead eksctl CloudFormation stack associated with given EKS cluster name.
	CleanUpObsoleteEksClusterStack(clusterName string, profile string, region string) error
}

EKSer is an interface that abstracts the use of the EKS API

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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