Skip to content

Commit

Permalink
Merge pull request #7728 from cPu1/fix-delete-cluster
Browse files Browse the repository at this point in the history
Fix deleting clusters with a non-active status
  • Loading branch information
cPu1 authored Apr 26, 2024
2 parents c9ee358 + 119b4c4 commit 98e1228
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 98e1228

Please sign in to comment.