From 940728b9ff7dab18e4ba8541ed492adef0c6f876 Mon Sep 17 00:00:00 2001 From: Jordan Olshevski Date: Thu, 4 Jan 2024 19:29:30 +0000 Subject: [PATCH] Remove slice check in the reconciler - will move to reconstitution cache --- internal/controllers/reconciliation/controller.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/internal/controllers/reconciliation/controller.go b/internal/controllers/reconciliation/controller.go index 3789480c..df3f62cc 100644 --- a/internal/controllers/reconciliation/controller.go +++ b/internal/controllers/reconciliation/controller.go @@ -113,7 +113,7 @@ func (c *Controller) Reconcile(ctx context.Context, req *reconstitution.Request) } // Do the reconciliation - if err := c.reconcileResource(ctx, slice, prev, resource, current); err != nil { + if err := c.reconcileResource(ctx, prev, resource, current); err != nil { return ctrl.Result{}, err } @@ -136,10 +136,10 @@ func (c *Controller) Reconcile(ctx context.Context, req *reconstitution.Request) return ctrl.Result{}, nil } -func (c *Controller) reconcileResource(ctx context.Context, slice *apiv1.ResourceSlice, prev, resource *reconstitution.Resource, current *unstructured.Unstructured) error { +func (c *Controller) reconcileResource(ctx context.Context, prev, resource *reconstitution.Resource, current *unstructured.Unstructured) error { logger := logr.FromContextOrDiscard(ctx) - if resource.Manifest.Deleted || slice.DeletionTimestamp != nil { + if resource.Manifest.Deleted { if current == nil || current.GetDeletionTimestamp() != nil { return nil // already deleted - nothing to do }