Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion internal/controller/gitrepository_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -1116,7 +1116,9 @@ func (r *GitRepositoryReconciler) reconcileDelete(ctx context.Context, obj *sour
controllerutil.RemoveFinalizer(obj, sourcev1.SourceFinalizer)

// Cleanup caches.
r.tokenCache.DeleteEventsForObject(sourcev1.GitRepositoryKind, obj.GetName(), obj.GetNamespace())
if r.tokenCache != nil {
r.tokenCache.DeleteEventsForObject(sourcev1.GitRepositoryKind, obj.GetName(), obj.GetNamespace())
}

// Stop reconciliation as the object is being deleted
return sreconcile.ResultEmpty, nil
Expand Down
Loading