Skip to content

Commit 5de5f6a

Browse files
kvapsclaude
andcommitted
fix(controller): drop empty MatchingFields from KVEntry list
controller-runtime rejects empty field selectors with "non-exact field matches are not supported by the cache" — the empty map was a no-op only at the type level. Stand reconcile loop was logging this on every Resource, blocking effective-props resolution and therefore the satellite dispatch. Drop the empty MatchingFields and filter by Instance in-process (small enough KV store that the indexed-selector wiring isn't worth it). Co-Authored-By: Claude <noreply@anthropic.com> Signed-off-by: Andrei Kvapil <kvapss@gmail.com>
1 parent 1c90e1e commit 5de5f6a

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

internal/controller/resource_controller.go

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -588,10 +588,16 @@ func (r *ResourceReconciler) resolveEffectiveProps(ctx context.Context, target *
588588

589589
// controllerProps reads the cluster-wide ControllerProps KV instance
590590
// via the KVEntry CRD. Empty when no entries exist (fresh cluster).
591+
//
592+
// We list every KVEntry and filter by Instance in-process; an
593+
// indexed `client.MatchingFields{"spec.instance": "ControllerProps"}`
594+
// would be cheaper but the controller-runtime cache rejects field
595+
// selectors that aren't pre-registered as field indexers, and the
596+
// extra wiring isn't worth it for a small KV store.
591597
func (r *ResourceReconciler) controllerProps(ctx context.Context) (map[string]string, error) {
592598
var list blockstoriov1alpha1.KVEntryList
593599

594-
err := r.List(ctx, &list, client.MatchingFields{})
600+
err := r.List(ctx, &list)
595601
if err != nil {
596602
return nil, err
597603
}

0 commit comments

Comments
 (0)