Repository navigation
fix(cluster-api): fix kamaji OOM and set limits on unset providers - #2708
Conversation
The kamaji control-plane-provider override in templates/providers.yaml targeted containers[name=manager], but the upstream container is named "controller". The CAPI operator merges container overrides by name, so the intended cpu: 1 / memory: 1024Mi limits were silently dropped and the upstream default of memory: 128Mi was used, producing repeated OOMKilled restarts of the kamaji controller (exit code 137). The other three providers (core, bootstrap, infraprovider/kubevirt) ship upstream with no resources block and have no cozystack override, so they run BestEffort and are first to evict under memory pressure. Set modest limits (500m / 256Mi) and requests (10m / 64Mi) matching typical CAPI controller-manager footprint. Assisted-By: Claude <[email protected]> Signed-off-by: Myasnikov Daniil <[email protected]>
Summary of ChangesHello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request improves the stability and reliability of Cluster API provider pods within the cozy-cluster-api system. By correcting a misnamed container override and establishing explicit resource constraints for previously unconfigured providers, the changes prevent unnecessary OOMKilled events and ensure more predictable scheduling behavior under memory pressure. Highlights
New Features🧠 You can now enable Memory (public preview) to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console. Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize the Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counterproductive. You can react with 👍 and 👎 on Gemini (@gemini-code-assist) comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here. Footnotes
|
|
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 (4)
📝 WalkthroughWalkthroughThis PR updates Kubernetes cluster-api provider templates across four packages, adding standardized resource requests and limits for manager containers in three providers (bootstrap, core, infrastructure) and renaming the container in the cpp provider from manager to controller for clarity. ChangesProvider Configuration Standardization
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes 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 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 |
There was a problem hiding this comment.
Code Review
This pull request updates the Cluster API provider templates across several system packages by defining resource requests and limits for the manager containers in the bootstrap, core, and infrastructure providers. Additionally, the container name in the control plane provider template was updated from manager to controller. I have no feedback to provide as the changes follow the project's standards for resource management.
|
Successfully created backport PR for |
|
Successfully created backport PR for |
What this PR does
Fixes resource specs on CAPI provider pods in
cozy-cluster-api.Kamaji control-plane-provider — fix OOMKilled crashloop.
The override in
packages/system/capi-providers-cpprovider/templates/providers.yamltargetedcontainers[name=manager], but the upstream container indocker.io/clastix/cluster-api-control-plane-provider-kamajiis namedcontroller. The CAPI operator merges container overrides by container name, so the intendedcpu: 1 / memory: 1024Milimits were silently dropped and the upstream default ofmemory: 128Miwas used. The kamaji controller pod therefore restarts repeatedly withexit code 137(OOMKilled), even at idle.Core / bootstrap / kubevirt providers — add limits.
Upstream
*-components.yamlfor these three providers ships with noresources:block, and cozystack added no override. The pods run BestEffort and are first to evict under memory pressure. Set modest limits (500m / 256Mi) and requests (10m / 64Mi) matching typical CAPI controller-manager footprint.Release note
Summary by CodeRabbit