Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions controllers/openstackcluster_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -152,9 +152,11 @@ func (r *OpenStackClusterReconciler) reconcileDelete(ctx context.Context, scope
// A bastion may have been created if cluster initialisation previously reached populating the network status
// We attempt to delete it even if no status was written, just in case
if openStackCluster.Status.Network != nil {
// Attempt to resolve bastion resources before delete. We don't need to worry about starting if the resources have changed on update.
// Attempt to resolve bastion resources before delete.
// Even if we fail, we need to continue with the deletion or risk getting stuck.
// For example, if the image doesn't exist, we do not have a bastion.
if _, err := resolveBastionResources(scope, clusterResourceName, openStackCluster); err != nil {
return reconcile.Result{}, err
scope.Logger().Info("Failed to resolve bastion, continuing.", "error", err)
}

if err := deleteBastion(scope, cluster, openStackCluster); err != nil {
Expand Down