fix: honor MCPServerRegistration targetRef namespace#1139
Conversation
Signed-off-by: Avinash Kumar Deepak <avinash8655279@gmail.com>
📝 WalkthroughWalkthrough
ChangesCross-namespace HTTPRoute Lookup
Estimated code review effort🎯 2 (Simple) | ⏱️ ~5 minutes Suggested labels
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
Hey @jasonmadigan fixed a small controller bug where MCPServerRegistration.spec.targetRef.namespace was ignored during HTTPRoute lookup....added a regression test and verified with go test ./internal/controller. |
|
Thanks for this @avinxshKD, it's exactly the I'd actually filed #1199 for this same bug just before David pointed me here.., could you add A few notes while it's still draft, no rush:
And whenever your primary PR merges (and if you've nothing else queued), would be great to bring this out of draft. happy to re-review and help get it over the line 🙂 |
Fixes MCPServerRegistration reconciliation when
spec.targetRef.namespacepoints at an HTTPRoute outside the registration namespace.The API and docs allow this, and the field index/status update paths already account for it, but
getTargetHTTPRoutealways read the route from the MCPServerRegistration namespace.This updates route lookup to use
targetRef.namespacewhen set, with a regression test for cross-namespace refs.Fixes: #1199
Tested:
Summary by CodeRabbit
Bug Fixes
Tests