fix: support resource proxy API group discovery#1001
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (5)
🚧 Files skipped from review as they are similar to previous changes (5)
📝 WalkthroughWalkthroughAdds support for Kubernetes API group discovery requests that specify a group but no version ( ChangesAPI Group Discovery Support
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ 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 |
Signed-off-by: immanuwell <pchpr.00@list.ru>
02498bd to
8651f7c
Compare
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1001 +/- ##
==========================================
+ Coverage 48.02% 48.04% +0.02%
==========================================
Files 123 123
Lines 18590 18607 +17
==========================================
+ Hits 8928 8940 +12
- Misses 8854 8859 +5
Partials 808 808
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
What does this PR do / why we need it:
/apis/<group>is a valid Kubernetes discovery endpoint, but the resource proxy only matched/apis/<group>/<version>.So discovery was kinda half-working.
/apis/appsgot rejected by the proxy before it ever reached the agent. This patch adds a dedicated matcher for group-only discovery and returns the matchingAPIGroupmetadata from the agent.Which issue(s) this PR fixes:
Related to #961
How to test changes / Special notes to the reviewer:
Repro for the old behavior:
/apis/apps => false/apis/apps/v1 => trueRun:
go test ./principal -run 'TestResource(RequestRegexp|GroupRequestRegexp)' -count=1go test ./agent -run Test_getAvailableAPIs -count=1go test ./agent ./principal -count=1 -timeout=10mChecklist
Summary by CodeRabbit
/apis/<group>) during request routing.