Skip to content

Commit 2bca025

Browse files
committed
Make sure to log error in findObjectsForSrc()
It is hidden right now if there is an error in configured named fields and index. Lets log the error and return the current state of requests. With this the findObjectsForSrc() will exit with an hidden error like: "error": "Index with name field:.spec.ksmTls.caBundleSecretName does not exist" Signed-off-by: Martin Schuppert <[email protected]>
1 parent 47b983c commit 2bca025

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

controllers/keystoneapi_controller.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -362,7 +362,8 @@ func (r *KeystoneAPIReconciler) findObjectsForSrc(ctx context.Context, src clien
362362
}
363363
err := r.List(ctx, crList, listOps)
364364
if err != nil {
365-
return []reconcile.Request{}
365+
Log.Error(err, fmt.Sprintf("listing %s for field: %s - %s", crList.GroupVersionKind().Kind, field, src.GetNamespace()))
366+
return requests
366367
}
367368

368369
for _, item := range crList.Items {

0 commit comments

Comments
 (0)