cluster

package
v1.3.6 Latest Latest
Warning

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

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

Documentation

Overview

Package cluster implements EKS cluster tester.

Index

Constants

View Source
const TemplateCluster = `` /* 1608-byte string literal not displayed */

TemplateCluster is the CloudFormation template for EKS cluster.

View Source
const TemplateClusterRole = `` /* 6806-byte string literal not displayed */

TemplateClusterRole is the CloudFormation template for EKS cluster role.

e.g.

Error creating load balancer (will retry): failed to ensure load balancer for service eks-*/hello-world-service: Error creating load balancer: "AccessDenied: User: arn:aws:sts::404174646922:assumed-role/eks-*-cluster-role/* is not authorized to perform: ec2:DescribeAccountAttributes\n\tstatus code: 403"

TODO: scope down (e.g. ec2:DescribeAccountAttributes, ec2:DescribeInternetGateways) mng, fargate, etc. may use other roles

View Source
const TemplateVPCPublicPrivate = `` /* 12947-byte string literal not displayed */

TemplateVPCPublicPrivate is the CloudFormation template for EKS VPC.

e.g. An error occurred (InvalidParameterException) when calling the CreateFargateProfile operation: Subnet subnet-123 provided in Fargate Profile is not a private subnet

Variables

This section is empty.

Functions

func Poll

func Poll(
	ctx context.Context,
	stopc chan struct{},
	lg *zap.Logger,
	eksAPI eksiface.EKSAPI,
	clusterName string,
	desiredClusterStatus string,
	initialWait time.Duration,
	wait time.Duration,
) <-chan ClusterStatus

Poll periodically fetches the cluster status until the cluster becomes the desired state.

Types

type ClusterStatus

type ClusterStatus struct {
	Cluster *aws_eks.Cluster
	Error   error
}

ClusterStatus represents the EKS cluster status.

type Config

type Config struct {
	Logger    *zap.Logger
	Stopc     chan struct{}
	EKSConfig *eksconfig.Config
	IAMAPI    iamiface.IAMAPI
	KMSAPI    kmsiface.KMSAPI
	CFNAPI    cloudformationiface.CloudFormationAPI
	EC2API    ec2iface.EC2API
	EKSAPI    eksiface.EKSAPI
	ELBV2API  elbv2iface.ELBV2API
}

Config defines version upgrade configuration.

type Tester

type Tester interface {
	// Create creates EKS cluster, and waits for completion.
	Create() error
	Client() k8s_client.EKS
	// CheckHealth checks EKS cluster health.
	CheckHealth() error
	// Delete deletes all EKS cluster resources.
	Delete() error
}

func New

func New(cfg Config) Tester

New creates a new Job tester.

Directories

Path Synopsis
Package versionupgrade implements EKS cluster version upgrade tester.
Package versionupgrade implements EKS cluster version upgrade tester.

Jump to

Keyboard shortcuts

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