Repository navigation
fix(kamaji): increase memory limits and add startup probe - #2421
Conversation
- Increase memory limit from 500Mi to 512Mi - Increase memory request from 100Mi to 256Mi - Add startup probe with 60s timeout (12 attempts × 5s) - Increase readiness/liveness initialDelaySeconds from 5/15 to 30s This fixes OOMKilled crashes observed in production where kamaji controller was being killed due to insufficient memory during startup. Signed-off-by: IvanHunters <[email protected]>
There was a problem hiding this comment.
Code review is billed via overage credits. To resume reviews, an organization admin can raise the monthly limit at claude.ai/admin-settings/claude-code.
Once credits are available, reopen this pull request to trigger a review.
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 addresses stability issues in the Kamaji controller by adjusting resource constraints and health check configurations. By providing more memory and allowing for a longer initialization window, the changes resolve frequent crash loops caused by insufficient memory and premature health checks during the startup phase. Highlights
🧠 New Feature in Public Preview: You can now enable Memory 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 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 counter productive. 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 (1)
📝 WalkthroughWalkthroughUpdated Kamaji container memory sizing by increasing request from 100Mi to 256Mi and limit from 500Mi to 512Mi. Introduced HTTP-based health check probes—startup, liveness, and readiness—targeting Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 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 resource requests and limits for the Kamaji package and introduces startup, liveness, and readiness probes. The review feedback suggests optimizing the probe configuration by reducing the initialDelaySeconds for liveness and readiness probes, as the new startup probe makes these delays redundant. Additionally, it is recommended to further increase the memory limit to provide better stability against potential OOM events.
| httpGet: | ||
| path: /healthz | ||
| port: healthcheck | ||
| initialDelaySeconds: 30 |
There was a problem hiding this comment.
When a startupProbe is configured, initialDelaySeconds on the livenessProbe is typically redundant because the liveness probe only starts after the startup probe has succeeded. Keeping a high initialDelaySeconds here unnecessarily delays the container from being monitored for liveness after it has successfully started. It is recommended to set this to 0 or a very small value.
initialDelaySeconds: 0| httpGet: | ||
| path: /readyz | ||
| port: healthcheck | ||
| initialDelaySeconds: 30 |
There was a problem hiding this comment.
Similar to the liveness probe, initialDelaySeconds on the readinessProbe is redundant when using a startupProbe. The readiness probe will naturally fail until the application is ready (e.g., finished leader election). Hardcoding a 30-second delay here unnecessarily prevents the pod from becoming ready as soon as it's actually capable of serving requests.
initialDelaySeconds: 0| limits: | ||
| cpu: 200m | ||
| memory: 500Mi | ||
| memory: 512Mi |
There was a problem hiding this comment.
The memory limit increase from 500Mi to 512Mi is quite small (approx. 2.4%). While the description mentions this is based on production testing, such a tight margin might lead to future OOMKilled events if the controller's memory usage fluctuates slightly. Consider providing a bit more headroom (e.g., 640Mi or 768Mi) for better stability.
|
Successfully created backport PR for |
The auto-generated changelog only listed #2459/#2467 (velero-configmap Role move). Five additional PRs were backported and merged into release-1.3 between then and the v1.3.1 tag (2026-04-28): - #2471/#2524 - fix(api): IDOR in TenantNamespace Get/Watch - #2496/#2505 - feat(linstor): linstor-csi v1.10.6 (Protocol-C dual-attach) - #2462/#2511 - fix(etcd): remove destructive post-upgrade hook - #2421/#2491 - fix(kamaji): memory limits + startup probe - #2498/#2518 - build(linstor): wire linstor-gui into root build target Update the release date to match the actual tag (2026-04-28), rewrite the intro paragraph, and add @kvaps to contributors. Signed-off-by: Myasnikov Daniil <[email protected]>
Summary
Problem
The kamaji controller was experiencing frequent CrashLoopBackOff due to OOMKilled errors. Analysis showed:
Solution
Memory increase:
Startup probe:
Probe delays:
Testing
Verified in production cluster:
Related Issues
Fixes tenant cluster components stuck in ContainerCreating due to missing kubeconfig secrets (caused by crashing kamaji controller).
Summary by CodeRabbit