Skip to content

Commit

Permalink
fix ut
Browse files Browse the repository at this point in the history
  • Loading branch information
kkkkun committed Jun 6, 2023
1 parent d5ff1ae commit 1f5fcb6
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -74,13 +74,13 @@ func (r *AdmiralReconciler) SetupWithManager(mgr ctrl.Manager) error {
}

// Watch for changes to Admiral
err = c.Watch(&source.Kind{Type: &crewv1.Admiral{}}, &handler.EnqueueRequestForObject{})
err = c.Watch(source.Kind(mgr.GetCache(), &crewv1.Admiral{}), &handler.EnqueueRequestForObject{})
if err != nil {
return err
}

// Watch for changes to deployed objects
_, err = declarative.WatchAll(mgr.GetConfig(), c, r, watchLabels)
err = declarative.WatchAll(mgr.GetConfig(), c, r, watchLabels)
if err != nil {
return err
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,13 +74,13 @@ func (r *CaptainReconciler) SetupWithManager(mgr ctrl.Manager) error {
}

// Watch for changes to Captain
err = c.Watch(&source.Kind{Type: &crewv1.Captain{}}, &handler.EnqueueRequestForObject{})
err = c.Watch(source.Kind(mgr.GetCache(), &crewv1.Captain{}), &handler.EnqueueRequestForObject{})
if err != nil {
return err
}

// Watch for changes to deployed objects
_, err = declarative.WatchAll(mgr.GetConfig(), c, r, watchLabels)
err = declarative.WatchAll(mgr.GetConfig(), c, r, watchLabels)
if err != nil {
return err
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,13 +74,13 @@ func (r *FirstMateReconciler) SetupWithManager(mgr ctrl.Manager) error {
}

// Watch for changes to FirstMate
err = c.Watch(&source.Kind{Type: &crewv1.FirstMate{}}, &handler.EnqueueRequestForObject{})
err = c.Watch(source.Kind(mgr.GetCache(), &crewv1.FirstMate{}), &handler.EnqueueRequestForObject{})
if err != nil {
return err
}

// Watch for changes to deployed objects
_, err = declarative.WatchAll(mgr.GetConfig(), c, r, watchLabels)
err = declarative.WatchAll(mgr.GetConfig(), c, r, watchLabels)
if err != nil {
return err
}
Expand Down

0 comments on commit 1f5fcb6

Please sign in to comment.