nodegroup

package
v0.176.0 Latest Latest
Warning

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

Go to latest
Published: Apr 5, 2024 License: Apache-2.0 Imports: 52 Imported by: 20

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AMIReleaseVersion added in v0.82.0

type AMIReleaseVersion struct {
	Version semver.Version
	Date    string
}

func ParseReleaseVersion added in v0.82.0

func ParseReleaseVersion(releaseVersion string) (AMIReleaseVersion, error)

ParseReleaseVersion parses an AMI release version string that's in the format `1.18.8-20201007`

func (AMIReleaseVersion) Compare added in v0.82.0

Compare returns 0 if a==b, -1 if a < b, and +1 if a > b.

func (AMIReleaseVersion) GTE added in v0.82.0

GTE checks if a is greater than or equal to b.

func (AMIReleaseVersion) LTE added in v0.82.0

LTE checks if a is less than or equal to b.

type AuthConfigMapUpdater added in v0.167.0

type AuthConfigMapUpdater interface {
	// RemoveNodeGroup removes the specified nodegroup.
	RemoveNodeGroup(*api.NodeGroup) error
}

AuthConfigMapUpdater updates the aws-auth ConfigMap.

type CreateOpts

type CreateOpts struct {
	UpdateAuthConfigMap       *bool
	InstallNeuronDevicePlugin bool
	InstallNvidiaDevicePlugin bool
	DryRunSettings            DryRunSettings
	SkipOutdatedAddonsCheck   bool
	ConfigFileProvided        bool
}

CreateOpts controls specific steps of node group creation

type DeleteOptions added in v0.167.0

type DeleteOptions struct {
	Wait                bool
	Plan                bool
	UpdateAuthConfigMap bool
}

DeleteOptions represents the options for deleting nodegroups.

type Deleter added in v0.167.0

type Deleter struct {
	StackHelper          StackHelper
	NodeGroupDeleter     manager.NodeGroupDeleter
	ClusterName          string
	AuthConfigMapUpdater AuthConfigMapUpdater
}

A Deleter deletes nodegroups.

func (*Deleter) Delete added in v0.167.0

func (d *Deleter) Delete(ctx context.Context, nodeGroups []*api.NodeGroup, managedNodeGroups []*api.ManagedNodeGroup, options DeleteOptions) error

Delete deletes the specified nodegroups.

type DrainInput added in v0.83.0

type DrainInput struct {
	NodeGroups            []eks.KubeNodeGroup
	Plan                  bool
	MaxGracePeriod        time.Duration
	NodeDrainWaitPeriod   time.Duration
	PodEvictionWaitPeriod time.Duration
	Undo                  bool
	DisableEviction       bool
	Parallel              int
}

type Drainer added in v0.167.0

type Drainer struct {
	ClientSet kubernetes.Interface
}

A Drainer drains nodegroups.

func (*Drainer) Drain added in v0.167.0

func (d *Drainer) Drain(ctx context.Context, input *DrainInput) error

Drain drains nodegroups.

type DryRunSettings added in v0.145.0

type DryRunSettings struct {
	DryRun    bool
	OutStream io.Writer
}

type Manager

type Manager struct {
	// contains filtered or unexported fields
}

func New

func New(cfg *api.ClusterConfig, ctl *eks.ClusterProvider, clientSet kubernetes.Interface, instanceSelector eks.InstanceSelector) *Manager

New creates a new manager.

func (*Manager) Create

func (m *Manager) Create(ctx context.Context, options CreateOpts, nodegroupFilter filter.NodegroupFilter) error

Create creates a new nodegroup with the given options.

func (*Manager) Get

func (m *Manager) Get(ctx context.Context, name string) (*Summary, error)

func (*Manager) GetAll

func (m *Manager) GetAll(ctx context.Context) ([]*Summary, error)

func (*Manager) Scale

func (m *Manager) Scale(ctx context.Context, ng *api.NodeGroupBase, wait bool) error

func (*Manager) Update added in v0.55.0

func (m *Manager) Update(ctx context.Context, wait bool) error

func (*Manager) Upgrade

func (m *Manager) Upgrade(ctx context.Context, options UpgradeOptions) error

type StackHelper added in v0.167.0

type StackHelper interface {
	NewTasksToDeleteNodeGroups(stacks []manager.NodeGroupStack, shouldDelete func(_ string) bool, wait bool, cleanup func(chan error, string) error) (*tasks.TaskTree, error)
	ListNodeGroupStacksWithStatuses(ctx context.Context) ([]manager.NodeGroupStack, error)
	NewTaskToDeleteUnownedNodeGroup(ctx context.Context, clusterName, nodegroup string, nodeGroupDeleter manager.NodeGroupDeleter, waitCondition *manager.DeleteWaitCondition) tasks.Task
}

StackHelper is a helper for managing nodegroup stacks.

type Summary added in v0.88.0

type Summary struct {
	StackName            string
	Cluster              string
	Name                 string
	Status               string
	MaxSize              int
	MinSize              int
	DesiredCapacity      int
	InstanceType         string
	ImageID              string
	CreationTime         time.Time
	NodeInstanceRoleARN  string
	AutoScalingGroupName string
	Version              string
	NodeGroupType        api.NodeGroupType `json:"Type"`
}

Summary represents a summary of a nodegroup stack

type UpgradeOptions added in v0.82.0

type UpgradeOptions struct {
	// NodeGroupName nodegroup name
	NodegroupName string
	// KubernetesVersion EKS version
	KubernetesVersion string
	// LaunchTemplateVersion launch template version
	// valid only if a nodegroup was created with a launch template
	LaunchTemplateVersion string
	//ForceUpgrade enables force upgrade
	ForceUpgrade bool
	// ReleaseVersion AMI version of the EKS optimized AMI to use
	ReleaseVersion string
	// Wait for the upgrade to finish
	Wait bool
	// Stack to upgrade
	Stack *manager.NodeGroupStack
}

UpgradeOptions contains options to configure nodegroup upgrades

type WaitFunc

type WaitFunc func(name, msg string, acceptors []request.WaiterAcceptor, newRequest func() *request.Request, waitTimeout time.Duration, troubleshoot func(string) error) error

Directories

Path Synopsis
Code generated by counterfeiter.
Code generated by counterfeiter.

Jump to

Keyboard shortcuts

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