Skip to content

Commit

Permalink
add logs
Browse files Browse the repository at this point in the history
Signed-off-by: dmitry.lopatin <[email protected]>
  • Loading branch information
LopatinDmitr committed Oct 12, 2024
1 parent 32569c9 commit 84005e7
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,11 @@ func (w VirtualImageWatcher) Watch(mgr manager.Manager, ctr controller.Controlle

func (w VirtualImageWatcher) enqueueRequests(_ context.Context, obj client.Object) (requests []reconcile.Request) {
vi, ok := obj.(*virtv2.VirtualImage)
println("")
println("")
println("dlopatin", vi.GetName())
println("")
println("")
if !ok {
w.logger.Error(fmt.Sprintf("expected a VirtualImage but got a %T", obj))
return
Expand Down Expand Up @@ -88,6 +93,6 @@ func (w VirtualImageWatcher) filterUpdateEvents(e event.UpdateEvent) bool {
w.logger.Error(fmt.Sprintf("expected a new VirtualImage but got a %T", e.ObjectNew))
return false
}

println("dlopatin", newVI.Name, oldVI.Status.Phase, newVI.Status.Phase, oldVI.Status.Phase != newVI.Status.Phase)
return oldVI.Status.Phase != newVI.Status.Phase
}

0 comments on commit 84005e7

Please sign in to comment.