automode

package
v0.201.0 Latest Latest
Warning

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

Go to latest
Published: Jan 14, 2025 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ClusterRoleManager

type ClusterRoleManager interface {
	UpdateRoleForAutoMode(ctx context.Context) error
	DeleteAutoModePolicies(ctx context.Context) error
}

A ClusterRoleManager manages the cluster role.

type EKSUpdater

type EKSUpdater interface {
	// UpdateClusterConfig updates the cluster config.
	UpdateClusterConfig(ctx context.Context, params *eks.UpdateClusterConfigInput, optFns ...func(*eks.Options)) (*eks.UpdateClusterConfigOutput, error)
	// UpdateDescriber describes an update.
	waiter.UpdateDescriber
}

EKSUpdater updates an EKS cluster.

type NodeGroupDrainer

type NodeGroupDrainer interface {
	// Drain drains nodegroups.
	Drain(ctx context.Context) error
}

A NodeGroupDrainer drains nodegroups.

type RoleManager

type RoleManager interface {
	CreateOrImport(ctx context.Context, clusterName string) (string, error)
	DeleteIfRequired(ctx context.Context) error
}

A RoleManager creates or deletes IAM roles.

type Updater

type Updater struct {
	RoleManager        RoleManager
	ClusterRoleManager ClusterRoleManager
	PodsGetter         corev1client.PodsGetter
	EKSUpdater         EKSUpdater
	Drainer            NodeGroupDrainer
}

An Updater enables or disables Auto Mode.

func (*Updater) Update

func (u *Updater) Update(ctx context.Context, clusterConfig *api.ClusterConfig, currentCluster *ekstypes.Cluster) error

Update updates the cluster to match the autoModeConfig settings supplied in clusterConfig.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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