[cozy-lib, bug] divf by cpu ratio, not mulf - #1125
Conversation
Signed-off-by: Timofei Larkin <[email protected]>
WalkthroughThe changes update the structure and processing of resource presets in the template system. The resource dictionaries for CPU and memory are flattened, and logic for generating "limits" from "requests" is removed. Template signatures are updated to accept an additional parameter, and invocations of the sanitize template are adjusted to reflect the new argument structure. Changes
Poem
📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (2)
⏰ Context from checks skipped due to timeout of 90000ms (2)
🔇 Additional comments (6)
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. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
|
suppressed by #1127 |
<!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Refactor** * Updated the structure of resource presets for improved clarity and processing. * Adjusted template logic to streamline resource handling and removed previous resource limit calculations. * Modified template parameters to enhance flexibility in resource processing. * **Chores** * Improved internal template invocation for better compatibility with resource data. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
<!-- This is an auto-generated comment: release notes by coderabbit.ai --> * **Refactor** * Updated the structure of resource presets for improved clarity and processing. * Adjusted template logic to streamline resource handling and removed previous resource limit calculations. * Modified template parameters to enhance flexibility in resource processing. * **Chores** * Improved internal template invocation for better compatibility with resource data. <!-- end of auto-generated comment: release notes by coderabbit.ai --> Signed-off-by: Andrei Kvapil <[email protected]>
Add. missing commits from #1127, which were skipped by mistake - [cozy-lib, bug] divf by cpu ratio, not mulf (#1125) - [cozy-lib] remove handler for nested resources/requests map - [cozy-lib] Introduce memory-allocation-ratio and ephemeral-strorage-allocation-ratio options - [system] Recuce resources for some system apps <!-- Thank you for making a contribution! Here are some tips for you: - Start the PR title with the [label] of Cozystack component: - For system components: [platform], [system], [linstor], [cilium], [kube-ovn], [dashboard], [cluster-api], etc. - For managed apps: [apps], [tenant], [kubernetes], [postgres], [virtual-machine] etc. - For development and maintenance: [tests], [ci], [docs], [maintenance]. - If it's a work in progress, consider creating this PR as a draft. - Don't hesistate to ask for opinion and review in the community chats, even if it's still a draft. - Add the label `backport` if it's a bugfix that needs to be backported to a previous version. --> ## What this PR does ### Release note <!-- Write a release note: - Explain what has changed internally and for users. - Start with the same [label] as in the PR title - Follow the guidelines at https://github.com/kubernetes/community/blob/master/contributors/guide/release-notes.md. --> ```release-note [cozy-lib] refactor resources ``` <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * Introduced support for memory and ephemeral storage allocation ratios, allowing more flexible resource allocation. * **Refactor** * Simplified resource preset structure for easier configuration and management. * Updated resource preset logic to use a new sanitization process for resource values. * **Bug Fixes** * Improved error handling for invalid resource preset keys. * **Chores** * Adjusted resource requests and limits for Redis master, FluxCD operator, and Vertical Pod Autoscaler components to optimize resource usage. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
Summary by CodeRabbit