Skip to content

Commit eeb0849

Browse files
committed
Fix govmomi e2e tests
Signed-off-by: Stefan Büringer [email protected]
1 parent db71fe5 commit eeb0849

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

controllers/vspherevm_controller.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -389,6 +389,12 @@ func (r vmReconciler) deleteNode(ctx context.Context, vmCtx *capvcontext.VMConte
389389
if err != nil {
390390
return ctrl.Result{}, err
391391
}
392+
393+
// Skip deleting the Node if the cluster is being deleted.
394+
if !cluster.DeletionTimestamp.IsZero() {
395+
return ctrl.Result{}, nil
396+
}
397+
392398
clusterClient, err := r.clusterCache.GetClient(ctx, ctrlclient.ObjectKeyFromObject(cluster))
393399
if err != nil {
394400
if errors.Is(err, clustercache.ErrClusterNotConnected) {

0 commit comments

Comments
 (0)