Skip to content

Commit f783f5d

Browse files
committed
enterprise replicaset should ignore external mongod search
1 parent 22b0670 commit f783f5d

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

controllers/operator/mongodbreplicaset_controller.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -421,6 +421,9 @@ func AddReplicaSetController(ctx context.Context, mgr manager.Manager, imageUrls
421421
err = c.Watch(source.Kind(mgr.GetCache(), &searchv1.MongoDBSearch{},
422422
handler.TypedEnqueueRequestsFromMapFunc(func(ctx context.Context, search *searchv1.MongoDBSearch) []reconcile.Request {
423423
source := search.GetMongoDBResourceRef()
424+
if source == nil {
425+
return []reconcile.Request{}
426+
}
424427
return []reconcile.Request{{NamespacedName: types.NamespacedName{Namespace: source.Namespace, Name: source.Name}}}
425428
})))
426429
if err != nil {

0 commit comments

Comments
 (0)