Skip to content

Commit

Permalink
chore: fix log (#857)
Browse files Browse the repository at this point in the history
  • Loading branch information
pmalek authored Nov 12, 2024
1 parent ba63aeb commit 02ce475
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions controller/dataplane/owned_finalizer_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,9 @@ func (r DataPlaneOwnedResourceFinalizerReconciler[T, PT]) Reconcile(ctx context.
// If the object does not have the finalizer, we don't need to do anything.
hasDataPlaneOwnedFinalizer := lo.Contains(obj.GetFinalizers(), consts.DataPlaneOwnedWaitForOwnerFinalizer)
if !hasDataPlaneOwnedFinalizer {
log.Debug(logger, fmt.Sprintf("object has no %q finalizer", consts.DataPlaneOwnedWaitForOwnerFinalizer), obj)
log.Debug(logger, "object has no finalizer",
"finalizer", consts.DataPlaneOwnedWaitForOwnerFinalizer,
)
return ctrl.Result{}, nil
}

Expand Down Expand Up @@ -191,7 +193,9 @@ func (r DataPlaneOwnedResourceFinalizerReconciler[T, PT]) Reconcile(ctx context.
return ctrl.Result{}, fmt.Errorf("failed to remove finalizer from %s %s: %w", obj.GetObjectKind().GroupVersionKind().Kind, obj.GetName(), err)
}

log.Debug(logger, fmt.Sprintf("removed %q finalizer", consts.DataPlaneOwnedWaitForOwnerFinalizer), obj)
log.Debug(logger, "removed finalizer",
"finalizer", consts.DataPlaneOwnedWaitForOwnerFinalizer,
)
return ctrl.Result{}, nil
}

Expand Down

0 comments on commit 02ce475

Please sign in to comment.