Skip to content

Commit

Permalink
Delete Sveltos Profile before releasing Cluster
Browse files Browse the repository at this point in the history
  • Loading branch information
wahabmk committed Oct 1, 2024
1 parent dadff0a commit f440cc4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions internal/controller/managedcluster_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -577,12 +577,12 @@ func (r *ManagedClusterReconciler) Delete(ctx context.Context, l logr.Logger, ma
return ctrl.Result{}, err
}

err = r.releaseCluster(ctx, managedCluster.Namespace, managedCluster.Name, managedCluster.Spec.Template)
err = sveltos.DeleteProfile(ctx, r.Client, managedCluster.Namespace, managedCluster.Name)
if err != nil {
return ctrl.Result{}, err
}

err = sveltos.DeleteProfile(ctx, r.Client, managedCluster.Namespace, managedCluster.Name)
err = r.releaseCluster(ctx, managedCluster.Namespace, managedCluster.Name, managedCluster.Spec.Template)
if err != nil {
return ctrl.Result{}, err
}
Expand Down

0 comments on commit f440cc4

Please sign in to comment.