Documentation ¶
Index ¶
- func GetEksctlVersionFromTags(tags []types.Tag) (semver.Version, bool, error)
- func GetIAMAddonName(stack *types.Stack) string
- func GetIAMServiceAccountName(s *Stack) string
- func GetNodeGroupType(tags []types.Tag) (api.NodeGroupType, error)
- func GetNodegroupTagName(tags []types.Tag) string
- func IsStackDoesNotExistError(err error) bool
- func MakeAddonStackName(clusterName, addonName string) string
- type ChangeSet
- type CreateNodeGroupOptions
- type CreateNodeGroupResourceSetFunc
- type DeleteUnownedNodegroupTask
- type DeleteWaitCondition
- type GetNodegroupOption
- type NewBootstrapperFunc
- type NewOIDCManager
- type NewTasksToDeleteAddonIAM
- type NewTasksToDeletePodIdentityRole
- type NoChangeError
- type NodeGroupDeleter
- type NodeGroupResourceSet
- type NodeGroupStack
- type NodeGroupStackManager
- type Stack
- type StackCollection
- func (c *StackCollection) AppendNewClusterStackResource(ctx context.Context, extendForOutposts, plan bool) (bool, error)
- func (c *StackCollection) ClusterHasDedicatedVPC(ctx context.Context) (bool, error)
- func (c *StackCollection) CreateStack(ctx context.Context, stackName string, resourceSet builder.ResourceSetReader, ...) error
- func (c *StackCollection) DeleteStackBySpec(ctx context.Context, s *Stack) (*Stack, error)
- func (c *StackCollection) DeleteStackBySpecSync(ctx context.Context, s *Stack, errs chan error) error
- func (c *StackCollection) DeleteStackSync(ctx context.Context, s *Stack) error
- func (c *StackCollection) DeleteTasksForDeprecatedStacks(ctx context.Context) (*tasks.TaskTree, error)
- func (c *StackCollection) DescribeClusterStack(ctx context.Context) (*Stack, error)
- func (c *StackCollection) DescribeClusterStackIfExists(ctx context.Context) (*Stack, error)
- func (c *StackCollection) DescribeIAMServiceAccountStacks(ctx context.Context) ([]*Stack, error)
- func (c *StackCollection) DescribeNodeGroupStack(ctx context.Context, nodeGroupName string) (*Stack, error)
- func (c *StackCollection) DescribeNodeGroupStacksAndResources(ctx context.Context) (map[string]StackInfo, error)
- func (c *StackCollection) DescribeStack(ctx context.Context, i *Stack) (*Stack, error)
- func (c *StackCollection) DescribeStackChangeSet(ctx context.Context, i *Stack, changeSetName string) (*ChangeSet, error)
- func (c *StackCollection) DescribeStackEvents(ctx context.Context, i *Stack) ([]types.StackEvent, error)
- func (c *StackCollection) DoCreateStackRequest(ctx context.Context, i *Stack, templateData TemplateData, ...) error
- func (c *StackCollection) DoWaitUntilStackIsCreated(ctx context.Context, i *Stack) error
- func (c *StackCollection) EnsureMapPublicIPOnLaunchEnabled(ctx context.Context) error
- func (c *StackCollection) FixClusterCompatibility(ctx context.Context) error
- func (c *StackCollection) GetAutoScalingGroupDesiredCapacity(ctx context.Context, name string) (asgtypes.AutoScalingGroup, error)
- func (c *StackCollection) GetAutoScalingGroupName(ctx context.Context, s *Stack) (string, error)
- func (c *StackCollection) GetClusterStackIfExists(ctx context.Context) (*Stack, error)
- func (c *StackCollection) GetFargateStack(ctx context.Context) (*Stack, error)
- func (c *StackCollection) GetIAMAddonsStacks(ctx context.Context) ([]*Stack, error)
- func (c *StackCollection) GetIAMServiceAccounts(ctx context.Context) ([]*api.ClusterIAMServiceAccount, error)
- func (c *StackCollection) GetKarpenterStack(ctx context.Context) (*Stack, error)
- func (c *StackCollection) GetManagedNodeGroupTemplate(ctx context.Context, options GetNodegroupOption) (string, error)
- func (*StackCollection) GetNodeGroupName(s *Stack) string
- func (c *StackCollection) GetNodeGroupStackType(ctx context.Context, options GetNodegroupOption) (api.NodeGroupType, error)
- func (c *StackCollection) GetStackTemplate(ctx context.Context, stackName string) (string, error)
- func (c *StackCollection) GetUnmanagedNodeGroupAutoScalingGroupName(ctx context.Context, s *Stack) (string, error)
- func (c *StackCollection) HasClusterStackFromList(ctx context.Context, clusterStackNames []string, clusterName string) (bool, error)
- func (c *StackCollection) ListAccessEntryStackNames(ctx context.Context, clusterName string) ([]string, error)
- func (c *StackCollection) ListAddonIAMStackNames(ctx context.Context, clusterName, addonName string) ([]string, error)
- func (c *StackCollection) ListClusterStackNames(ctx context.Context) ([]string, error)
- func (c *StackCollection) ListIAMServiceAccountStacks(ctx context.Context) ([]string, error)
- func (c *StackCollection) ListNodeGroupStacks(ctx context.Context) ([]*Stack, error)
- func (c *StackCollection) ListNodeGroupStacksWithStatuses(ctx context.Context) ([]NodeGroupStack, error)
- func (c *StackCollection) ListPodIdentityStackNames(ctx context.Context) ([]string, error)
- func (c *StackCollection) ListStackNames(ctx context.Context, regExp string) ([]string, error)
- func (c *StackCollection) ListStacks(ctx context.Context) ([]*Stack, error)
- func (c *StackCollection) ListStacksMatching(ctx context.Context, nameRegex string, statusFilters ...types.StackStatus) ([]*Stack, error)
- func (c *StackCollection) ListStacksWithStatuses(ctx context.Context, statusFilters ...types.StackStatus) ([]*Stack, error)
- func (c *StackCollection) LookupCloudTrailEvents(ctx context.Context, i *Stack) ([]cttypes.Event, error)
- func (c *StackCollection) MakeChangeSetName(action string) string
- func (c *StackCollection) MakeClusterStackName() string
- func (c *StackCollection) MakeClusterStackNameFromName(name string) string
- func (c *StackCollection) MustUpdateStack(ctx context.Context, options UpdateStackOptions) error
- func (c *StackCollection) NewManagedNodeGroupTask(ctx context.Context, nodeGroups []*api.ManagedNodeGroup, ...) *tasks.TaskTree
- func (c *StackCollection) NewTaskToDeleteUnownedNodeGroup(ctx context.Context, clusterName, nodegroup string, ...) tasks.Task
- func (c *StackCollection) NewTasksToCreateCluster(ctx context.Context, nodeGroups []*api.NodeGroup, ...) *tasks.TaskTree
- func (c *StackCollection) NewTasksToCreateIAMServiceAccounts(serviceAccounts []*api.ClusterIAMServiceAccount, ...) *tasks.TaskTree
- func (c *StackCollection) NewTasksToDeleteClusterWithNodeGroups(ctx context.Context, clusterStack *Stack, nodeGroupStacks []NodeGroupStack, ...) (*tasks.TaskTree, error)
- func (c *StackCollection) NewTasksToDeleteIAMServiceAccounts(ctx context.Context, serviceAccounts []string, ...) (*tasks.TaskTree, error)
- func (c *StackCollection) NewTasksToDeleteNodeGroups(nodeGroupStacks []NodeGroupStack, shouldDelete func(string) bool, wait bool, ...) (*tasks.TaskTree, error)
- func (c *StackCollection) NewTasksToDeleteOIDCProviderWithIAMServiceAccounts(ctx context.Context, newOIDCManager NewOIDCManager, cluster *ekstypes.Cluster, ...) (*tasks.TaskTree, error)
- func (c *StackCollection) NewUnmanagedNodeGroupTask(ctx context.Context, nodeGroups []*api.NodeGroup, ...) *tasks.TaskTree
- func (c *StackCollection) PropagateManagedNodeGroupTagsToASG(ngName string, ngTags map[string]string, asgNames []string, errCh chan error) error
- func (c *StackCollection) RefreshFargatePodExecutionRoleARN(ctx context.Context) error
- func (*StackCollection) StackStatusIsNotTransitional(s *Stack) bool
- func (c *StackCollection) TroubleshootStackFailureCause(ctx context.Context, s *cfntypes.Stack, desiredStatus cfntypes.StackStatus)
- func (c *StackCollection) UpdateNodeGroupStack(ctx context.Context, nodeGroupName, template string, wait bool) error
- func (c *StackCollection) UpdateStack(ctx context.Context, options UpdateStackOptions) error
- type StackInfo
- type StackManager
- type StackNotFoundErr
- type TemplateBody
- type TemplateData
- type TemplateURL
- type UnmanagedNodeGroupTask
- type UpdateStackOptions
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetEksctlVersionFromTags ¶
GetEksctlVersionFromTags returns the eksctl version used to create or update the stack
func GetIAMAddonName ¶ added in v0.181.0
GetIAMAddonName returns the addon name for stack.
func GetIAMServiceAccountName ¶ added in v0.39.0
GetIAMServiceAccountName will return iamserviceaccount name based on tags
func GetNodeGroupType ¶
func GetNodeGroupType(tags []types.Tag) (api.NodeGroupType, error)
GetNodeGroupType returns the nodegroup type
func GetNodegroupTagName ¶
GetNodegroupTagName returns the nodegroup name of a stack based on its tags. Taking into account legacy tags.
func IsStackDoesNotExistError ¶ added in v0.95.0
func MakeAddonStackName ¶ added in v0.181.0
MakeAddonStackName creates a stack name for clusterName and addonName.
Types ¶
type ChangeSet ¶
type ChangeSet = cloudformation.DescribeChangeSetOutput
ChangeSet represents a CloudFormation ChangeSet
type CreateNodeGroupOptions ¶ added in v0.177.0
type CreateNodeGroupOptions struct { ForceAddCNIPolicy bool SkipEgressRules bool DisableAccessEntryCreation bool VPCImporter vpc.Importer Parallelism int }
CreateNodeGroupOptions holds options for creating nodegroup tasks.
type CreateNodeGroupResourceSetFunc ¶ added in v0.177.0
type CreateNodeGroupResourceSetFunc func(options builder.NodeGroupOptions) NodeGroupResourceSet
CreateNodeGroupResourceSetFunc creates a new NodeGroupResourceSet.
type DeleteUnownedNodegroupTask ¶ added in v0.40.0
type DeleteUnownedNodegroupTask struct {
// contains filtered or unexported fields
}
func (*DeleteUnownedNodegroupTask) Describe ¶ added in v0.40.0
func (d *DeleteUnownedNodegroupTask) Describe() string
func (*DeleteUnownedNodegroupTask) Do ¶ added in v0.40.0
func (d *DeleteUnownedNodegroupTask) Do() error
type DeleteWaitCondition ¶ added in v0.40.0
type GetNodegroupOption ¶ added in v0.84.0
type GetNodegroupOption struct { Stack *NodeGroupStack NodeGroupName string }
GetNodegroupOption nodegroup options.
type NewBootstrapperFunc ¶ added in v0.177.0
type NewBootstrapperFunc func(clusterConfig *api.ClusterConfig, ng *api.NodeGroup) (nodebootstrap.Bootstrapper, error)
NewBootstrapperFunc creates a new Bootstrapper for ng.
type NewOIDCManager ¶ added in v0.102.0
type NewOIDCManager func() (*iamoidc.OpenIDConnectManager, error)
type NewTasksToDeleteAddonIAM ¶ added in v0.161.0
NewTasksToDeleteAddonIAM temporary type, to be removed after moving NewTasksToDeleteClusterWithNodeGroups to actions package
type NewTasksToDeletePodIdentityRole ¶ added in v0.165.0
NewTasksToDeletePodIdentityRole temporary type, to be removed after moving NewTasksToDeleteClusterWithNodeGroups to actions package
type NoChangeError ¶ added in v0.165.0
type NoChangeError struct {
Msg string
}
NoChangeError represents an error for when a CloudFormation changeset contains no changes.
func (*NoChangeError) Error ¶ added in v0.165.0
func (e *NoChangeError) Error() string
type NodeGroupDeleter ¶ added in v0.167.0
type NodeGroupDeleter interface {
DeleteNodegroup(ctx context.Context, params *awseks.DeleteNodegroupInput, optFns ...func(*awseks.Options)) (*awseks.DeleteNodegroupOutput, error)
}
type NodeGroupResourceSet ¶ added in v0.177.0
type NodeGroupResourceSet interface { // AddAllResources adds all nodegroup resources. AddAllResources(ctx context.Context) error builder.ResourceSetReader }
A NodeGroupResourceSet creates resources for a nodegroup.
type NodeGroupStack ¶
type NodeGroupStack struct { NodeGroupName string Type api.NodeGroupType UsesAccessEntry bool Stack *Stack }
NodeGroupStack represents a nodegroup and its type
type NodeGroupStackManager ¶ added in v0.177.0
type NodeGroupStackManager interface { // CreateStack creates a CloudFormation stack. CreateStack(ctx context.Context, stackName string, resourceSet builder.ResourceSetReader, tags, parameters map[string]string, errs chan error) error }
A NodeGroupStackManager describes and creates nodegroup stacks.
type StackCollection ¶
type StackCollection struct {
// contains filtered or unexported fields
}
StackCollection stores the CloudFormation stack information
func (*StackCollection) AppendNewClusterStackResource ¶
func (c *StackCollection) AppendNewClusterStackResource(ctx context.Context, extendForOutposts, plan bool) (bool, error)
AppendNewClusterStackResource will update cluster stack with new resources in append-only way
func (*StackCollection) ClusterHasDedicatedVPC ¶ added in v0.112.0
func (c *StackCollection) ClusterHasDedicatedVPC(ctx context.Context) (bool, error)
ClusterHasDedicatedVPC returns true if the cluster was created with a dedicated VPC.
func (*StackCollection) CreateStack ¶
func (c *StackCollection) CreateStack(ctx context.Context, stackName string, resourceSet builder.ResourceSetReader, tags, parameters map[string]string, errs chan error) error
CreateStack with given name, stack builder instance and parameters; any errors will be written to errs channel, when nil is written, assume completion, do not expect more than one error value on the channel, it's closed immediately after it is written to.
func (*StackCollection) DeleteStackBySpec ¶
DeleteStackBySpec sends a request to delete the stack
func (*StackCollection) DeleteStackBySpecSync ¶
func (c *StackCollection) DeleteStackBySpecSync(ctx context.Context, s *Stack, errs chan error) error
DeleteStackBySpecSync sends a request to delete the stack, and waits until status is DELETE_COMPLETE; any errors will be written to errs channel, assume completion when nil is written, do not expect more than one error value on the channel, it's closed immediately after it is written to
func (*StackCollection) DeleteStackSync ¶ added in v0.84.0
func (c *StackCollection) DeleteStackSync(ctx context.Context, s *Stack) error
DeleteStackSync sends a request to delete the stack, and waits until status is DELETE_COMPLETE;
func (*StackCollection) DeleteTasksForDeprecatedStacks ¶
func (c *StackCollection) DeleteTasksForDeprecatedStacks(ctx context.Context) (*tasks.TaskTree, error)
DeleteTasksForDeprecatedStacks deletes all deprecated stacks.
func (*StackCollection) DescribeClusterStack ¶
func (c *StackCollection) DescribeClusterStack(ctx context.Context) (*Stack, error)
DescribeClusterStack returns the cluster stack. If the stack does not exist, it returns an error.
func (*StackCollection) DescribeClusterStackIfExists ¶ added in v0.112.0
func (c *StackCollection) DescribeClusterStackIfExists(ctx context.Context) (*Stack, error)
DescribeClusterStackIfExists calls ListStacks and filters out cluster stack. If the stack does not exist, it returns nil.
func (*StackCollection) DescribeIAMServiceAccountStacks ¶
func (c *StackCollection) DescribeIAMServiceAccountStacks(ctx context.Context) ([]*Stack, error)
DescribeIAMServiceAccountStacks calls ListStacks and filters out iamserviceaccounts
func (*StackCollection) DescribeNodeGroupStack ¶
func (c *StackCollection) DescribeNodeGroupStack(ctx context.Context, nodeGroupName string) (*Stack, error)
DescribeNodeGroupStack gets the specified nodegroup stack
func (*StackCollection) DescribeNodeGroupStacksAndResources ¶
func (c *StackCollection) DescribeNodeGroupStacksAndResources(ctx context.Context) (map[string]StackInfo, error)
DescribeNodeGroupStacksAndResources calls DescribeNodeGroupStackList and fetches all resources, then returns it in a map by nodegroup name
func (*StackCollection) DescribeStack ¶
DescribeStack describes a cloudformation stack.
func (*StackCollection) DescribeStackChangeSet ¶
func (c *StackCollection) DescribeStackChangeSet(ctx context.Context, i *Stack, changeSetName string) (*ChangeSet, error)
DescribeStackChangeSet describes a ChangeSet by name
func (*StackCollection) DescribeStackEvents ¶
func (c *StackCollection) DescribeStackEvents(ctx context.Context, i *Stack) ([]types.StackEvent, error)
DescribeStackEvents describes the events that have occurred on the stack
func (*StackCollection) DoCreateStackRequest ¶
func (c *StackCollection) DoCreateStackRequest(ctx context.Context, i *Stack, templateData TemplateData, tags, parameters map[string]string, withIAM bool, withNamedIAM bool) error
DoCreateStackRequest requests the creation of a CloudFormation stack
func (*StackCollection) DoWaitUntilStackIsCreated ¶
func (c *StackCollection) DoWaitUntilStackIsCreated(ctx context.Context, i *Stack) error
DoWaitUntilStackIsCreated blocks until the given stack's creation has completed.
func (*StackCollection) EnsureMapPublicIPOnLaunchEnabled ¶
func (c *StackCollection) EnsureMapPublicIPOnLaunchEnabled(ctx context.Context) error
EnsureMapPublicIPOnLaunchEnabled sets this subnet property to true when it is not set or is set to false
func (*StackCollection) FixClusterCompatibility ¶
func (c *StackCollection) FixClusterCompatibility(ctx context.Context) error
FixClusterCompatibility adds any resources missing in the CloudFormation stack in order to support new features like Managed Nodegroups and Fargate
func (*StackCollection) GetAutoScalingGroupDesiredCapacity ¶ added in v0.45.0
func (c *StackCollection) GetAutoScalingGroupDesiredCapacity(ctx context.Context, name string) (asgtypes.AutoScalingGroup, error)
func (*StackCollection) GetAutoScalingGroupName ¶ added in v0.39.0
func (*StackCollection) GetClusterStackIfExists ¶ added in v0.73.0
func (c *StackCollection) GetClusterStackIfExists(ctx context.Context) (*Stack, error)
func (*StackCollection) GetFargateStack ¶
func (c *StackCollection) GetFargateStack(ctx context.Context) (*Stack, error)
GetFargateStack returns the stack holding the fargate IAM resources, if any
func (*StackCollection) GetIAMAddonsStacks ¶
func (c *StackCollection) GetIAMAddonsStacks(ctx context.Context) ([]*Stack, error)
func (*StackCollection) GetIAMServiceAccounts ¶
func (c *StackCollection) GetIAMServiceAccounts(ctx context.Context) ([]*api.ClusterIAMServiceAccount, error)
GetIAMServiceAccounts calls DescribeIAMServiceAccountStacks and return native iamserviceaccounts
func (*StackCollection) GetKarpenterStack ¶ added in v0.83.0
func (c *StackCollection) GetKarpenterStack(ctx context.Context) (*Stack, error)
GetKarpenterStack returns the stack holding the karpenter IAM resources
func (*StackCollection) GetManagedNodeGroupTemplate ¶
func (c *StackCollection) GetManagedNodeGroupTemplate(ctx context.Context, options GetNodegroupOption) (string, error)
GetManagedNodeGroupTemplate returns the template for a ManagedNodeGroup resource
func (*StackCollection) GetNodeGroupName ¶
func (*StackCollection) GetNodeGroupName(s *Stack) string
GetNodeGroupName will return nodegroup name based on tags
func (*StackCollection) GetNodeGroupStackType ¶
func (c *StackCollection) GetNodeGroupStackType(ctx context.Context, options GetNodegroupOption) (api.NodeGroupType, error)
GetNodeGroupStackType returns the nodegroup stack type
func (*StackCollection) GetStackTemplate ¶
GetStackTemplate gets the Cloudformation template for a stack and returns a json string representation
func (*StackCollection) GetUnmanagedNodeGroupAutoScalingGroupName ¶ added in v0.88.0
func (c *StackCollection) GetUnmanagedNodeGroupAutoScalingGroupName(ctx context.Context, s *Stack) (string, error)
GetUnmanagedNodeGroupAutoScalingGroupName returns the unmanaged nodegroup's AutoScalingGroupName.
func (*StackCollection) HasClusterStackFromList ¶ added in v0.88.0
func (*StackCollection) ListAccessEntryStackNames ¶ added in v0.167.0
func (c *StackCollection) ListAccessEntryStackNames(ctx context.Context, clusterName string) ([]string, error)
ListAccessEntryStackNames lists the stack names for all access entries in the specified cluster.
func (*StackCollection) ListAddonIAMStackNames ¶ added in v0.181.0
func (c *StackCollection) ListAddonIAMStackNames(ctx context.Context, clusterName, addonName string) ([]string, error)
ListAddonIAMStackNames lists the stack names for all access entries in the specified cluster.
func (*StackCollection) ListClusterStackNames ¶
func (c *StackCollection) ListClusterStackNames(ctx context.Context) ([]string, error)
ListClusterStackNames gets all stack names matching regex
func (*StackCollection) ListIAMServiceAccountStacks ¶
func (c *StackCollection) ListIAMServiceAccountStacks(ctx context.Context) ([]string, error)
ListIAMServiceAccountStacks calls DescribeIAMServiceAccountStacks and returns only iamserviceaccount names
func (*StackCollection) ListNodeGroupStacks ¶
func (c *StackCollection) ListNodeGroupStacks(ctx context.Context) ([]*Stack, error)
ListNodeGroupStacks calls ListStacks and filters out nodegroups
func (*StackCollection) ListNodeGroupStacksWithStatuses ¶ added in v0.114.0
func (c *StackCollection) ListNodeGroupStacksWithStatuses(ctx context.Context) ([]NodeGroupStack, error)
ListNodeGroupStacksWithStatuses returns a list of NodeGroupStacks.
func (*StackCollection) ListPodIdentityStackNames ¶ added in v0.166.0
func (c *StackCollection) ListPodIdentityStackNames(ctx context.Context) ([]string, error)
func (*StackCollection) ListStackNames ¶ added in v0.165.0
ListStackNames lists all stack names matching regExp.
func (*StackCollection) ListStacks ¶
func (c *StackCollection) ListStacks(ctx context.Context) ([]*Stack, error)
ListStacks describes the existing stacks
func (*StackCollection) ListStacksMatching ¶
func (c *StackCollection) ListStacksMatching(ctx context.Context, nameRegex string, statusFilters ...types.StackStatus) ([]*Stack, error)
ListStacksMatching gets all of CloudFormation stacks with names matching nameRegex.
func (*StackCollection) ListStacksWithStatuses ¶ added in v0.114.0
func (c *StackCollection) ListStacksWithStatuses(ctx context.Context, statusFilters ...types.StackStatus) ([]*Stack, error)
ListStacksWithStatuses gets all of CloudFormation stacks
func (*StackCollection) LookupCloudTrailEvents ¶
func (*StackCollection) MakeChangeSetName ¶
func (c *StackCollection) MakeChangeSetName(action string) string
MakeChangeSetName builds a consistent name for a changeset.
func (*StackCollection) MakeClusterStackName ¶ added in v0.40.0
func (c *StackCollection) MakeClusterStackName() string
func (*StackCollection) MakeClusterStackNameFromName ¶ added in v0.84.0
func (c *StackCollection) MakeClusterStackNameFromName(name string) string
func (*StackCollection) MustUpdateStack ¶ added in v0.165.0
func (c *StackCollection) MustUpdateStack(ctx context.Context, options UpdateStackOptions) error
MustUpdateStack is like UpdateStack but returns a NoChangeError if there are no changes to execute.
func (*StackCollection) NewManagedNodeGroupTask ¶
func (c *StackCollection) NewManagedNodeGroupTask(ctx context.Context, nodeGroups []*api.ManagedNodeGroup, forceAddCNIPolicy bool, vpcImporter vpc.Importer, nodeGroupParallelism int) *tasks.TaskTree
NewManagedNodeGroupTask defines tasks required to create managed nodegroups
func (*StackCollection) NewTaskToDeleteUnownedNodeGroup ¶ added in v0.40.0
func (c *StackCollection) NewTaskToDeleteUnownedNodeGroup(ctx context.Context, clusterName, nodegroup string, nodeGroupDeleter NodeGroupDeleter, waitCondition *DeleteWaitCondition) tasks.Task
func (*StackCollection) NewTasksToCreateCluster ¶ added in v0.167.0
func (c *StackCollection) NewTasksToCreateCluster(ctx context.Context, nodeGroups []*api.NodeGroup, managedNodeGroups []*api.ManagedNodeGroup, accessConfig *api.AccessConfig, accessEntryCreator accessentry.CreatorInterface, nodeGroupParallelism int, postClusterCreationTasks ...tasks.Task) *tasks.TaskTree
NewTasksToCreateCluster defines all tasks required to create a cluster along with some nodegroups; see CreateAllNodeGroups for how onlyNodeGroupSubset works.
func (*StackCollection) NewTasksToCreateIAMServiceAccounts ¶
func (c *StackCollection) NewTasksToCreateIAMServiceAccounts(serviceAccounts []*api.ClusterIAMServiceAccount, oidc *iamoidc.OpenIDConnectManager, clientSetGetter kubernetes.ClientSetGetter) *tasks.TaskTree
NewTasksToCreateIAMServiceAccounts defines tasks required to create all of the IAM ServiceAccounts
func (*StackCollection) NewTasksToDeleteClusterWithNodeGroups ¶
func (c *StackCollection) NewTasksToDeleteClusterWithNodeGroups( ctx context.Context, clusterStack *Stack, nodeGroupStacks []NodeGroupStack, clusterOperable bool, newOIDCManager NewOIDCManager, newTasksToDeleteAddonIAM NewTasksToDeleteAddonIAM, newTasksToDeletePodIdentityRole NewTasksToDeletePodIdentityRole, cluster *ekstypes.Cluster, clientSetGetter kubernetes.ClientSetGetter, wait, force bool, cleanup func(chan error, string) error) (*tasks.TaskTree, error)
NewTasksToDeleteClusterWithNodeGroups defines tasks required to delete the given cluster along with all of its resources
func (*StackCollection) NewTasksToDeleteIAMServiceAccounts ¶
func (c *StackCollection) NewTasksToDeleteIAMServiceAccounts(ctx context.Context, serviceAccounts []string, clientSetGetter kubernetes.ClientSetGetter, wait bool) (*tasks.TaskTree, error)
NewTasksToDeleteIAMServiceAccounts defines tasks required to delete all of the iamserviceaccounts
func (*StackCollection) NewTasksToDeleteNodeGroups ¶
func (c *StackCollection) NewTasksToDeleteNodeGroups(nodeGroupStacks []NodeGroupStack, shouldDelete func(string) bool, wait bool, cleanup func(chan error, string) error) (*tasks.TaskTree, error)
NewTasksToDeleteNodeGroups defines tasks required to delete all nodegroups.
func (*StackCollection) NewTasksToDeleteOIDCProviderWithIAMServiceAccounts ¶
func (c *StackCollection) NewTasksToDeleteOIDCProviderWithIAMServiceAccounts(ctx context.Context, newOIDCManager NewOIDCManager, cluster *ekstypes.Cluster, clientSetGetter kubernetes.ClientSetGetter, force bool) (*tasks.TaskTree, error)
NewTasksToDeleteOIDCProviderWithIAMServiceAccounts defines tasks required to delete all of the iamserviceaccounts along with associated IAM OIDC provider
func (*StackCollection) NewUnmanagedNodeGroupTask ¶
func (c *StackCollection) NewUnmanagedNodeGroupTask(ctx context.Context, nodeGroups []*api.NodeGroup, forceAddCNIPolicy, skipEgressRules, disableAccessEntryCreation bool, vpcImporter vpc.Importer, parallelism int) *tasks.TaskTree
NewUnmanagedNodeGroupTask returns tasks for creating self-managed nodegroups.
func (*StackCollection) PropagateManagedNodeGroupTagsToASG ¶ added in v0.95.0
func (*StackCollection) RefreshFargatePodExecutionRoleARN ¶
func (c *StackCollection) RefreshFargatePodExecutionRoleARN(ctx context.Context) error
RefreshFargatePodExecutionRoleARN reads the CloudFormation stacks and their output values, and sets the Fargate pod execution role ARN to the ClusterConfig. If there is no cluster stack found but a fargate stack exists, use the output from that stack.
func (*StackCollection) StackStatusIsNotTransitional ¶
func (*StackCollection) StackStatusIsNotTransitional(s *Stack) bool
StackStatusIsNotTransitional will return true when stack status is non-transitional
func (*StackCollection) TroubleshootStackFailureCause ¶ added in v0.167.0
func (c *StackCollection) TroubleshootStackFailureCause(ctx context.Context, s *cfntypes.Stack, desiredStatus cfntypes.StackStatus)
TroubleshootStackFailureCause identifies the cause of the stack's failure and prints the stack events leading to the failure.
func (*StackCollection) UpdateNodeGroupStack ¶
func (c *StackCollection) UpdateNodeGroupStack(ctx context.Context, nodeGroupName, template string, wait bool) error
UpdateNodeGroupStack updates the nodegroup stack with the specified template
func (*StackCollection) UpdateStack ¶
func (c *StackCollection) UpdateStack(ctx context.Context, options UpdateStackOptions) error
UpdateStack will update a CloudFormation stack by creating and executing a ChangeSet
type StackInfo ¶
type StackInfo struct { Stack *Stack Resources []types.StackResource }
StackInfo hold the stack along with template and resources
type StackManager ¶ added in v0.39.0
type StackManager interface { AppendNewClusterStackResource(ctx context.Context, extendForOutposts, plan bool) (bool, error) CreateStack(ctx context.Context, name string, stack builder.ResourceSetReader, tags, parameters map[string]string, errs chan error) error DeleteStackBySpec(ctx context.Context, s *Stack) (*Stack, error) DeleteStackBySpecSync(ctx context.Context, s *Stack, errs chan error) error DeleteStackSync(ctx context.Context, s *Stack) error DeleteTasksForDeprecatedStacks(ctx context.Context) (*tasks.TaskTree, error) DescribeClusterStackIfExists(ctx context.Context) (*Stack, error) DescribeClusterStack(ctx context.Context) (*Stack, error) DescribeIAMServiceAccountStacks(ctx context.Context) ([]*Stack, error) DescribeNodeGroupStack(ctx context.Context, nodeGroupName string) (*Stack, error) DescribeNodeGroupStacksAndResources(ctx context.Context) (map[string]StackInfo, error) DescribeStack(ctx context.Context, i *Stack) (*Stack, error) DescribeStackChangeSet(ctx context.Context, i *Stack, changeSetName string) (*ChangeSet, error) DescribeStackEvents(ctx context.Context, i *Stack) ([]cfntypes.StackEvent, error) DoCreateStackRequest(ctx context.Context, i *Stack, templateData TemplateData, tags, parameters map[string]string, withIAM bool, withNamedIAM bool) error DoWaitUntilStackIsCreated(ctx context.Context, i *Stack) error EnsureMapPublicIPOnLaunchEnabled(ctx context.Context) error FixClusterCompatibility(ctx context.Context) error ClusterHasDedicatedVPC(ctx context.Context) (bool, error) GetAutoScalingGroupDesiredCapacity(ctx context.Context, name string) (asgtypes.AutoScalingGroup, error) GetAutoScalingGroupName(ctx context.Context, s *Stack) (string, error) GetClusterStackIfExists(ctx context.Context) (*Stack, error) GetFargateStack(ctx context.Context) (*Stack, error) GetIAMAddonsStacks(ctx context.Context) ([]*Stack, error) GetIAMServiceAccounts(ctx context.Context) ([]*api.ClusterIAMServiceAccount, error) GetKarpenterStack(ctx context.Context) (*Stack, error) GetManagedNodeGroupTemplate(ctx context.Context, options GetNodegroupOption) (string, error) GetNodeGroupName(s *Stack) string GetNodeGroupStackType(ctx context.Context, options GetNodegroupOption) (api.NodeGroupType, error) GetStackTemplate(ctx context.Context, stackName string) (string, error) GetUnmanagedNodeGroupAutoScalingGroupName(ctx context.Context, s *Stack) (string, error) HasClusterStackFromList(ctx context.Context, clusterStackNames []string, clusterName string) (bool, error) ListClusterStackNames(ctx context.Context) ([]string, error) ListIAMServiceAccountStacks(ctx context.Context) ([]string, error) ListNodeGroupStacks(ctx context.Context) ([]*Stack, error) ListNodeGroupStacksWithStatuses(ctx context.Context) ([]NodeGroupStack, error) ListPodIdentityStackNames(ctx context.Context) ([]string, error) ListStacks(ctx context.Context) ([]*Stack, error) ListStacksWithStatuses(ctx context.Context, statusFilters ...cfntypes.StackStatus) ([]*Stack, error) ListStacksMatching(ctx context.Context, nameRegex string, statusFilters ...cfntypes.StackStatus) ([]*Stack, error) ListStackNames(ctx context.Context, regExp string) ([]string, error) ListAccessEntryStackNames(ctx context.Context, clusterName string) ([]string, error) LookupCloudTrailEvents(ctx context.Context, i *Stack) ([]cttypes.Event, error) MakeChangeSetName(action string) string MakeClusterStackName() string NewManagedNodeGroupTask(ctx context.Context, nodeGroups []*api.ManagedNodeGroup, forceAddCNIPolicy bool, importer vpc.Importer, nodeGroupParallelism int) *tasks.TaskTree NewTasksToDeleteClusterWithNodeGroups(ctx context.Context, clusterStack *Stack, nodeGroupStacks []NodeGroupStack, clusterOperable bool, newOIDCManager NewOIDCManager, newTasksToDeleteAddonIAM NewTasksToDeleteAddonIAM, newTasksToDeletePodIdentityRole NewTasksToDeletePodIdentityRole, cluster *ekstypes.Cluster, clientSetGetter kubernetes.ClientSetGetter, wait, force bool, cleanup func(chan error, string) error) (*tasks.TaskTree, error) NewTasksToCreateIAMServiceAccounts(serviceAccounts []*api.ClusterIAMServiceAccount, oidc *iamoidc.OpenIDConnectManager, clientSetGetter kubernetes.ClientSetGetter) *tasks.TaskTree NewTaskToDeleteUnownedNodeGroup(ctx context.Context, clusterName, nodegroup string, nodeGroupDeleter NodeGroupDeleter, waitCondition *DeleteWaitCondition) tasks.Task NewTasksToCreateCluster(ctx context.Context, nodeGroups []*api.NodeGroup, managedNodeGroups []*api.ManagedNodeGroup, accessConfig *api.AccessConfig, accessEntryCreator accessentry.CreatorInterface, nodeGroupParallelism int, postClusterCreationTasks ...tasks.Task) *tasks.TaskTree NewTasksToDeleteIAMServiceAccounts(ctx context.Context, serviceAccounts []string, clientSetGetter kubernetes.ClientSetGetter, wait bool) (*tasks.TaskTree, error) NewTasksToDeleteNodeGroups(stacks []NodeGroupStack, shouldDelete func(_ string) bool, wait bool, cleanup func(chan error, string) error) (*tasks.TaskTree, error) NewTasksToDeleteOIDCProviderWithIAMServiceAccounts(ctx context.Context, newOIDCManager NewOIDCManager, cluster *ekstypes.Cluster, clientSetGetter kubernetes.ClientSetGetter, force bool) (*tasks.TaskTree, error) NewUnmanagedNodeGroupTask(ctx context.Context, nodeGroups []*api.NodeGroup, forceAddCNIPolicy, skipEgressRules, disableAccessEntryCreation bool, importer vpc.Importer, nodeGroupParallelism int) *tasks.TaskTree PropagateManagedNodeGroupTagsToASG(ngName string, ngTags map[string]string, asgNames []string, errCh chan error) error RefreshFargatePodExecutionRoleARN(ctx context.Context) error StackStatusIsNotTransitional(s *Stack) bool TroubleshootStackFailureCause(ctx context.Context, s *cfntypes.Stack, desiredStatus cfntypes.StackStatus) UpdateNodeGroupStack(ctx context.Context, nodeGroupName, template string, wait bool) error UpdateStack(ctx context.Context, options UpdateStackOptions) error MustUpdateStack(ctx context.Context, options UpdateStackOptions) error }
func NewStackCollection ¶
func NewStackCollection(provider api.ClusterProvider, spec *api.ClusterConfig) StackManager
NewStackCollection creates a stack manager for a single cluster
type StackNotFoundErr ¶ added in v0.40.0
type StackNotFoundErr struct {
ClusterName string
}
func (*StackNotFoundErr) Error ¶ added in v0.40.0
func (e *StackNotFoundErr) Error() string
type TemplateData ¶
type TemplateData interface {
// contains filtered or unexported methods
}
TemplateData is a union (sum type) to describe template data.
type UnmanagedNodeGroupTask ¶ added in v0.177.0
type UnmanagedNodeGroupTask struct { ClusterConfig *api.ClusterConfig NodeGroups []*api.NodeGroup CreateNodeGroupResourceSet CreateNodeGroupResourceSetFunc NewBootstrapper NewBootstrapperFunc EKSAPI awsapi.EKS StackManager NodeGroupStackManager }
UnmanagedNodeGroupTask creates tasks for creating self-managed nodegroups.
func (*UnmanagedNodeGroupTask) Create ¶ added in v0.177.0
func (t *UnmanagedNodeGroupTask) Create(ctx context.Context, options CreateNodeGroupOptions) *tasks.TaskTree
Create creates a TaskTree for creating nodegroups.
type UpdateStackOptions ¶ added in v0.73.0
type UpdateStackOptions struct { Stack *Stack StackName string ChangeSetName string Description string TemplateData TemplateData Parameters map[string]string Wait bool }
UpdateStackOptions contains options for updating a stack.