fix(quota): use Knowledge CRD flavor groups for Limes summary RAM con…#898
fix(quota): use Knowledge CRD flavor groups for Limes summary RAM con…#898umswmayj wants to merge 1 commit into
Conversation
…version buildLimesSummary was using a static FlavorGroupResourceConfig from the quota controller's config for RAM???Limes unit conversion. If the config didn't have the group's ramUnitGiB set (e.g., 480 for group 2152), it defaulted to 1 GiB per unit, causing GiBToDeclaredUnits(960)=960 instead of the correct value of 2. Now uses FlavorGroupFeature from the Knowledge CRD directly (the same source of truth used by the usage API endpoint), which reads SmallestFlavor.MemoryMB dynamically. This eliminates config drift between the API and quota controller.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughThe controller now threads Knowledge-derived ChangesLimes Unit Summary Refactoring
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes Possibly related PRs
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 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 |
Test Coverage ReportTest Coverage 📊: 69.6% |
…version
buildLimesSummary was using a static FlavorGroupResourceConfig from the quota controller's config for RAM???Limes unit conversion. If the config didn't have the group's ramUnitGiB set (e.g., 480 for group 2152), it defaulted to 1 GiB per unit, causing GiBToDeclaredUnits(960)=960 instead of the correct value of 2.
Now uses FlavorGroupFeature from the Knowledge CRD directly (the same source of truth used by the usage API endpoint), which reads SmallestFlavor.MemoryMB dynamically. This eliminates config drift between the API and quota controller.