Browse Source

bugfix: return error catching for watch

pull/4/head
Vladimir Smagin 1 year ago
parent
commit
1deb7941e2
1 changed files with 3 additions and 4 deletions
  1. +3
    -4
      pkg/controller/rabbitmq/rabbitmq_controller.go

+ 3
- 4
pkg/controller/rabbitmq/rabbitmq_controller.go View File

@@ -70,6 +70,9 @@ func add(mgr manager.Manager, reconciler reconcile.Reconciler) error {
err = c.Watch(&source.Kind{Type: &v1.StatefulSet{}}, &handler.EnqueueRequestForOwner{
OwnerType: &rabbitmqv1.Rabbitmq{},
})
if err != nil {
return err
}

mapFn := handler.ToRequestsFunc(
func(a handler.MapObject) []reconcile.Request {
@@ -103,10 +106,6 @@ func add(mgr manager.Manager, reconciler reconcile.Reconciler) error {
return err
}

if err != nil {
return err
}

return nil
}



Loading…
Cancel
Save