Skip to content

Commit

Permalink
Stop removing FIP-assoc when worker is removed
Browse files Browse the repository at this point in the history
  • Loading branch information
skaramicke committed Oct 16, 2023
1 parent 24ad578 commit 9d64ad3
Showing 1 changed file with 0 additions and 8 deletions.
8 changes: 0 additions & 8 deletions controllers/openstackmachine_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -273,14 +273,6 @@ func (r *OpenStackMachineReconciler) reconcileDelete(scope scope.Scope, cluster
}
}

// If this is a worker node and it has a floating IP attached, disassociate it.
if !util.IsControlPlaneMachine(machine) && openStackMachine.Spec.FloatingIP != "" {
if err = networkingService.DisassociateFloatingIP(machine, openStackMachine.Spec.FloatingIP); err != nil {
conditions.MarkFalse(openStackMachine, infrav1.APIServerIngressReadyCondition, infrav1.FloatingIPErrorReason, clusterv1.ConditionSeverityError, "Disassociating floating IP failed: %v", err)
return ctrl.Result{}, fmt.Errorf("disassociate floating IP: %w", err)
}
}

instanceSpec := machineToInstanceSpec(openStackCluster, machine, openStackMachine, "")

if err := computeService.DeleteInstance(openStackCluster, openStackMachine, instanceStatus, instanceSpec); err != nil {
Expand Down

0 comments on commit 9d64ad3

Please sign in to comment.