nodewaiter

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: 22 Imported by: 0

Documentation

Overview

Package nodewaiter implements node waiter.

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

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,
	mngName 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{}
	EKSConfig *eksconfig.Config
	K8SClient k8s_client.EKS
	EC2API    ec2iface.EC2API
	ASGAPI    autoscalingiface.AutoScalingAPI
	EKSAPI    eksiface.EKSAPI
}

Config defines version upgrade configuration.

type ManagedNodeGroupStatus

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

ManagedNodeGroupStatus represents the CloudFormation status.

type NodeWaiter

type NodeWaiter interface {
	// Wait waits until all MNG and Kubernetes nodes are ready.
	Wait(mngName string, retries int) error
}

NodeWaiter defines node waiter operation.

func New

func New(cfg Config) NodeWaiter

New creates a new node waiter.

Jump to

Keyboard shortcuts

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