Make kubevirt's CPU allocation ratio configurable - #905
Conversation
Kubevirt's default cpu-to-vcpu ration is 1:10, which might be a bit extreme for some users. This patch introduces a new key in the Cozystack configmap, "cpu-allocation-ratio" where admins of Cozystack can specify an alternative value, if needed. Signed-off-by: Timofei Larkin <lllamnyp@gmail.com>
WalkthroughA conditional mechanism was introduced to propagate a Changes
Sequence Diagram(s)sequenceDiagram
participant ConfigMap (cozystack)
participant Helm Release (kubevirt)
participant KubeVirt CR
ConfigMap-->>Helm Release: Provide cpu-allocation-ratio (if exists)
Helm Release-->>KubeVirt CR: Inject cpuAllocationRatio into developerConfiguration (if set)
Poem
📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (2)
🧰 Additional context used🪛 YAMLlint (1.35.1)packages/system/kubevirt/templates/kubevirt-cr.yaml[warning] 14-14: wrong indentation: expected 4 but found 6 (indentation) [error] 13-13: syntax error: expected the node content, but found '-' (syntax) ⏰ Context from checks skipped due to timeout of 90000ms (1)
🔇 Additional comments (2)
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:
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 (
|
Kubevirt's default cpu-to-vcpu ration is 1:10, which might be a bit extreme for some users. This patch introduces a new key in the Cozystack configmap, "cpu-allocation-ratio" where admins of Cozystack can specify an alternative value, if needed. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **New Features** - Added support for optionally configuring a CPU allocation ratio for KubeVirt deployments when the relevant setting is provided. - **Chores** - Improved configuration flexibility for KubeVirt by allowing dynamic injection of CPU allocation settings. <!-- end of auto-generated comment: release notes by coderabbit.ai --> (cherry picked from commit c482289) Signed-off-by: Timofei Larkin <lllamnyp@gmail.com>
Update for cozystack/cozystack#905 Signed-off-by: Nick Volynkin <nick.volynkin@gmail.com>
Update for cozystack/cozystack#905 Signed-off-by: Nick Volynkin <nick.volynkin@gmail.com>
Kubevirt's default cpu-to-vcpu ration is 1:10, which might be a bit extreme for some users. This patch introduces a new key in the Cozystack configmap, "cpu-allocation-ratio" where admins of Cozystack can specify an alternative value, if needed.
Summary by CodeRabbit