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 authored and adamjensenbot committed Oct 29, 2024
1 parent e2d5938 commit d048681
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 d048681

Please sign in to comment.