Documentation
¶
Overview ¶
Package wait implements node waiter.
Index ¶
- Constants
- func IsDeleted(err error) bool
- func Poll(ctx context.Context, stopc chan struct{}, lg *zap.Logger, logWriter io.Writer, ...) <-chan ManagedNodeGroupStatus
- func PollUpdate(ctx context.Context, stopc chan struct{}, lg *zap.Logger, logWriter io.Writer, ...) <-chan UpdateStatus
- type Config
- type ManagedNodeGroupStatus
- type NodeWaiter
- type Op
- type OpOption
- type UpdateStatus
Constants ¶
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 ¶
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, logWriter io.Writer, eksAPI eksiface.EKSAPI, clusterName string, mngName string, desiredNodeGroupStatus string, initialWait time.Duration, pollInterval time.Duration, opts ...OpOption) <-chan ManagedNodeGroupStatus
Poll periodically fetches the managed node group status until the node group becomes the desired state.
func PollUpdate ¶ added in v1.4.6
func PollUpdate( ctx context.Context, stopc chan struct{}, lg *zap.Logger, logWriter io.Writer, eksAPI eksiface.EKSAPI, clusterName string, mngName string, requestID string, desiredUpdateStatus string, initialWait time.Duration, pollInterval time.Duration, opts ...OpOption) <-chan UpdateStatus
PollUpdate periodically fetches the MNG update status until the MNG update becomes the desired state. ref. https://docs.aws.amazon.com/eks/latest/APIReference/API_DescribeUpdate.html
Types ¶
type Config ¶
type Config struct {
Logger *zap.Logger
LogWriter io.Writer
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.
type Op ¶ added in v1.4.6
type Op struct {
// contains filtered or unexported fields
}
Op represents a MNG operation.
type OpOption ¶ added in v1.4.6
type OpOption func(*Op)
OpOption configures archiver operations.
func WithQueryFunc ¶ added in v1.4.6
func WithQueryFunc(f func()) OpOption
WithQueryFunc configures query function to be called in retry func.
type UpdateStatus ¶ added in v1.4.6
UpdateStatus represents the CloudFormation status.