Skip to content

Commit

Permalink
Fix deleting clusters with a non-active status
Browse files Browse the repository at this point in the history
  • Loading branch information
cPu1 committed Apr 26, 2024
1 parent c9ee358 commit 119b4c4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions pkg/actions/cluster/owned.go
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,9 @@ func (c *OwnedCluster) Delete(ctx context.Context, _, podEvictionWaitPeriod time
}
newTasksToDeleteAddonIAM := addon.NewRemover(c.stackManager).DeleteAddonIAMTasks
newTasksToDeletePodIdentityRoles := func() (*tasks.TaskTree, error) {
if !clusterOperable {
return &tasks.TaskTree{}, nil
}
clientSet, err = c.newClientSet()
if err != nil {
if force {
Expand Down
2 changes: 1 addition & 1 deletion pkg/cfn/manager/delete_tasks.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ type NewOIDCManager func() (*iamoidc.OpenIDConnectManager, error)
// NewTasksToDeleteAddonIAM temporary type, to be removed after moving NewTasksToDeleteClusterWithNodeGroups to actions package
type NewTasksToDeleteAddonIAM func(ctx context.Context, wait bool) (*tasks.TaskTree, error)

// NewTasksToDeletePodIdentityRoles temporary type, to be removed after moving NewTasksToDeleteClusterWithNodeGroups to actions package
// NewTasksToDeletePodIdentityRole temporary type, to be removed after moving NewTasksToDeleteClusterWithNodeGroups to actions package
type NewTasksToDeletePodIdentityRole func() (*tasks.TaskTree, error)

// NewTasksToDeleteClusterWithNodeGroups defines tasks required to delete the given cluster along with all of its resources
Expand Down

0 comments on commit 119b4c4

Please sign in to comment.