Skip to content

Commit

Permalink
Remove slice check in the reconciler - will move to reconstitution cache
Browse files Browse the repository at this point in the history
  • Loading branch information
Jordan Olshevski committed Jan 4, 2024
1 parent 522de7c commit 940728b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions internal/controllers/reconciliation/controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

Expand All @@ -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
}
Expand Down

0 comments on commit 940728b

Please sign in to comment.