Skip to content

Commit

Permalink
Fix stackdelete problem
Browse files Browse the repository at this point in the history
Signed-off-by: Drumil Patel <[email protected]>
  • Loading branch information
weastel committed Sep 6, 2020
1 parent 2f10379 commit 596ac75
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
3 changes: 0 additions & 3 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,5 @@ require (
k8s.io/apimachinery v0.18.4
k8s.io/client-go v0.18.4
sigs.k8s.io/aws-iam-authenticator v0.5.1
<<<<<<< HEAD
sigs.k8s.io/kind v0.8.1
=======
>>>>>>> Add aws iam based authentication
)
10 changes: 6 additions & 4 deletions pkg/provider/eks/eks.go
Original file line number Diff line number Diff line change
Expand Up @@ -252,6 +252,7 @@ func (c *EKS) createStack(clusterName string) ([]string, error) {
Value: aws.String("shared"),
},
},
DisableRollback: aws.Bool(true),
}

log.Printf("Stack create request: name:'%s'", *req.StackName)
Expand Down Expand Up @@ -327,11 +328,12 @@ func (c *EKS) stackDeleted(name string) (bool, error) {
}
stackRes, err := c.clientCF.DescribeStacks(req)

if err.(awserr.Error).Code() == "ValidationError" {
return true, nil
}

if err != nil {

if err.(awserr.Error).Code() == "ValidationError" {
return true, nil
}

return false, fmt.Errorf("Couldn't get stack status: %v", err)
}

Expand Down

0 comments on commit 596ac75

Please sign in to comment.