automode

package
v0.196.0-rc.0 Latest Latest
Warning

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

Go to latest
Published: Dec 2, 2024 License: Apache-2.0 Imports: 14 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 struct {
	IAMRoleManager  awsapi.IAM
	StackManager    manager.StackManager
	Region          string
	ClusterRoleName string
}

func (*ClusterRoleManager) DeleteAutoModePolicies

func (c *ClusterRoleManager) DeleteAutoModePolicies(ctx context.Context) error

func (*ClusterRoleManager) UpdateRoleForAutoMode

func (c *ClusterRoleManager) UpdateRoleForAutoMode(ctx context.Context) error

type IAMRoleManager

type IAMRoleManager interface {
	AttachRolePolicy(ctx context.Context, params *iam.AttachRolePolicyInput, optFns ...func(options *iam.Options)) (*iam.AttachRolePolicyOutput, error)
	DetachRolePolicy(ctx context.Context, params *iam.DetachRolePolicyInput, optFns ...func(options *iam.Options)) (*iam.DetachRolePolicyOutput, error)
}

type RoleCreator

type RoleCreator struct {
	StackCreator StackCreator
}

A RoleCreator creates an IAM role for nodes launched by Auto Mode.

func (*RoleCreator) CreateOrImport

func (r *RoleCreator) CreateOrImport(ctx context.Context, clusterName string) (string, error)

CreateOrImport creates a new role or imports an existing role if it exists in the cluster stack.

type RoleDeleter

type RoleDeleter struct {
	StackDeleter StackDeleter
	Cluster      *ekstypes.Cluster
}

A RoleDeleter deletes the IAM role created for Auto Mode.

func (*RoleDeleter) DeleteIfRequired

func (d *RoleDeleter) DeleteIfRequired(ctx context.Context) error

DeleteIfRequired deletes the node role used by Auto Mode if it exists.

type StackCreator

type StackCreator interface {
	CreateStack(ctx context.Context, stackName string, resourceSet builder.ResourceSetReader, tags, parameters map[string]string, errs chan error) error
	GetClusterStackIfExists(ctx context.Context) (*cfntypes.Stack, error)
}

A StackCreator creates CloudFormation stacks.

type StackDeleter

type StackDeleter interface {
	DeleteStackSync(context.Context, *cfntypes.Stack) error
	DescribeStack(ctx context.Context, stack *cfntypes.Stack) (*cfntypes.Stack, error)
}

A StackDeleter deletes CloudFormation stacks.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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