Skip to content

Commit

Permalink
fix logic around deletion of ALL and PLATFORM
Browse files Browse the repository at this point in the history
  • Loading branch information
Kam D Kasravi committed Mar 27, 2019
1 parent 45b31b0 commit 89de9c3
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions bootstrap/pkg/kfapp/coordinator/coordinator.go
Original file line number Diff line number Diff line change
Expand Up @@ -453,12 +453,16 @@ func (kfapp *coordinator) Delete(resources kftypes.ResourceEnum) error {

switch resources {
case kftypes.ALL:
fallthrough
case kftypes.PLATFORM:
if err := k8s(); err != nil {
return err
return fmt.Errorf("error while deleting k8 resources, aborting deleting the platform. Error %v", err)
}
return platform()
case kftypes.PLATFORM:
// deleting the PLATFORM means deleting the cluster. We remove k8s first in order free up any cloud vendor
// resources. Deleting k8 resources is a best effort and partial delete or failure should not
// prevent PLATFORM (cluster) deletion
_ := k8s()
return platform()
case kftypes.K8S:
return k8s()
}
Expand Down

0 comments on commit 89de9c3

Please sign in to comment.