mng

package
v0.6.5 Latest Latest
Warning

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

Go to latest
Published: Feb 28, 2020 License: Apache-2.0 Imports: 35 Imported by: 0

Documentation

Overview

Package mng defines AWS EKS Managed Node Group configuration.

Index

Constants

View Source
const ManagedNodeGroupStatusDELETEDORNOTEXIST = "DELETED/NOT-EXIST"

ManagedNodeGroupStatusDELETEDORNOTEXIST defines the cluster status when the cluster is not found.

ref. https://docs.aws.amazon.com/eks/latest/APIReference/API_Nodegroup.html

CREATING
ACTIVE
DELETING
FAILED
UPDATING
View Source
const TemplateManagedNodeGroupWithNoReleaseVersion = `` /* 2411-byte string literal not displayed */

TemplateManagedNodeGroupWithNoReleaseVersion is the CloudFormation template for EKS managed node group. ref. https://docs.aws.amazon.com/eks/latest/userguide/create-managed-node-group.html ref. https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-eks-nodegroup.html

View Source
const TemplateManagedNodeGroupWithReleaseVersion = `` /* 2583-byte string literal not displayed */

TemplateManagedNodeGroupWithReleaseVersion is the CloudFormation template for EKS managed node group. ref. https://docs.aws.amazon.com/eks/latest/userguide/create-managed-node-group.html ref. https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-eks-nodegroup.html

View Source
const TemplateRole = `` /* 1256-byte string literal not displayed */

TemplateRole is the CloudFormation template for EKS managed node group role. https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-eks-nodegroup.html

Variables

This section is empty.

Functions

func IsDeleted

func IsDeleted(err error) bool

IsDeleted returns true if error from EKS API indicates that the EKS managed node group has already been deleted.

func Poll

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

Poll periodically fetches the managed node group status until the node group becomes the desired state.

Types

type Config

type Config struct {
	Logger    *zap.Logger
	Stopc     chan struct{}
	Sig       chan os.Signal
	EKSConfig *eksconfig.Config
	K8SClient k8sClientSetGetter
	CFNAPI    cloudformationiface.CloudFormationAPI
	EC2API    ec2iface.EC2API
	ASGAPI    autoscalingiface.AutoScalingAPI
	EKSAPI    eksiface.EKSAPI
}

Config defines Managed Node Group configuration.

type ManagedNodeGroupStatus

type ManagedNodeGroupStatus struct {
	NodeGroupName string
	NodeGroup     *awseks.Nodegroup
	Error         error
}

ManagedNodeGroupStatus represents the CloudFormation status.

type Tester

type Tester interface {
	// Create creates EKS "Managed Node Group", and waits for completion.
	Create() error
	// Delete deletes all EKS "Managed Node Group" resources.
	Delete() error

	// FetchLogs fetches logs from all worker nodes.
	FetchLogs() error
	// DownloadClusterLogs dumps all logs to artifact directory.
	// Let default kubetest log dumper handle all artifact uploads.
	// See https://github.com/kubernetes/test-infra/pull/9811/files#r225776067.
	DownloadClusterLogs(artifactDir string) error
}

Tester implements EKS "Managed Node Group" for "kubetest2" Deployer. ref. https://github.com/kubernetes/test-infra/blob/master/kubetest2/pkg/types/types.go ref. https://docs.aws.amazon.com/eks/latest/userguide/create-managed-node-group.html ref. https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-eks-nodegroup.html

func New

func New(cfg Config) (Tester, error)

New creates a new Job tester.

Jump to

Keyboard shortcuts

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