Skip to content

Commit

Permalink
fix: avoid creation of VirtualNode if ResourceSlice deleting
Browse files Browse the repository at this point in the history
  • Loading branch information
fra98 committed Oct 25, 2024
1 parent b2ac20b commit 29ab9ba
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,11 @@ func (r *VirtualNodeCreatorReconciler) Reconcile(ctx context.Context, req ctrl.R
return ctrl.Result{}, err
}

if resourceSlice.DeletionTimestamp != nil {
klog.V(6).Infof("ResourceSlice %q is being deleted", req.NamespacedName)
return ctrl.Result{}, nil
}

if resourceSlice.Annotations == nil ||
resourceSlice.Annotations[consts.CreateVirtualNodeAnnotation] == "" ||
strings.EqualFold(resourceSlice.Annotations[consts.CreateVirtualNodeAnnotation], "false") {
Expand Down

0 comments on commit 29ab9ba

Please sign in to comment.