Skip to content

[kubernetes] Add CPU/memory limits to csi-resizer sidecar - #2614

Merged
Aleksei Sviridkin (lexfrei) merged 1 commit into
cozystack:mainfrom
matthieu-robin:fix/kubernetes-csi-resizer-cpu-limit
Jul 3, 2026
Merged

Aleksei Sviridkin (lexfrei) merged 1 commit into
cozystack:mainfrom
matthieu-robin:fix/kubernetes-csi-resizer-cpu-limit

Conversation

@matthieu-robin

@matthieu-robin Matthieu ROBIN (matthieu-robin) commented May 12, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

  • The csi-resizer container in packages/apps/kubernetes/templates/csi/deploy.yaml was the only sidecar in the kcsi-controller Deployment without resources.limits, which triggers a "no CPU limit" conformance warning.
  • Aligned it with the other six CSI sidecars in the same Deployment: limits cpu: 512m / memory: 512Mi and requests cpu: 125m / memory: 128Mi.
  • No other files touched; vendored charts and other CSI drivers (nfs-driver, piraeus-operator) are out of scope for this PR.

Test plan

  • make -C packages/apps/kubernetes show NAME=test NAMESPACE=test renders the Deployment with the new limits block
  • Re-run the conformance/lint tool that originally flagged the warning — csi-resizer has no CPU limit should be gone
  • CI passes

Release note

```release-note
Set CPU and memory limits on the csi-resizer sidecar of the kubevirt-csi controller to align with the other CSI sidecars and clear the "no CPU limit" conformance warning.
```

Summary by CodeRabbit

  • Chores
    • Updated resource allocation for the CSI resizer component, increasing CPU and memory requests to improve performance and reliability.

Review Change Stack

@claude claude Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Claude Code Review

This pull request is from a fork — automated review is disabled. A repository maintainer can comment @claude review to run a one-time review.

@gemini-code-assist

Copy link
Copy Markdown
Contributor

Summary of Changes

Hello, 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 updates the resource configuration for the csi-resizer sidecar within the kcsi-controller deployment. By defining appropriate limits and aligning requests with existing sidecars, the change resolves conformance warnings regarding missing CPU limits and ensures uniform resource management across the deployment.

Highlights

  • Resource Configuration: Added explicit CPU and memory limits to the csi-resizer sidecar container.
  • Resource Alignment: Updated resource requests to 125m CPU and 128Mi memory to maintain consistency with other CSI sidecars in the deployment.
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 Assist

The 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 /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment Gemini (@gemini-code-assist) Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

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 .gemini/ folder in the base of the repository. Detailed instructions can be found here.

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

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution. ↩

@github-actions github-actions Bot added size/XS This PR changes 0-9 lines, ignoring generated files area/kubernetes Issues or PRs related to the tenant Kubernetes app labels May 12, 2026
@coderabbitai

coderabbitai Bot commented May 12, 2026 •

Copy link
Copy Markdown
Contributor

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 334a4b97-9914-40fa-8a6a-767bffa7d742

📥 Commits

Reviewing files that changed from the base of the PR and between 86f5267 and b2ff024.

📒 Files selected for processing (1)
  • packages/apps/kubernetes/templates/csi/deploy.yaml

📝 Walkthrough

Walkthrough

The CSI controller Deployment template increases resource requests for the csi-resizer container, raising CPU allocation from 10m to 125m and memory from 20Mi to 128Mi. This is a targeted resource adjustment in the Kubernetes configuration.

Changes

CSI Resizer Resource Adjustment

Layer / File(s) Summary
CSI resizer resource requests
packages/apps/kubernetes/templates/csi/deploy.yaml
The csi-resizer container resource requests are increased: CPU from 10m to 125m, and memory from 20Mi to 128Mi.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Poem

🐰 A resizer asks for more room to stretch,
From 10 millicores to 125—a better fetch!
Memory doubles, from 20 to 128 Mi,
Resources bloom as containers fly high! ✨

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title describes adding CPU/memory limits to csi-resizer, but the summary shows it's specifically about adding resource requests and limits. The title says 'limits' but omits that requests are also being set, which is a key part of the change.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Tip

💬 Introducing Slack Agent: The best way for teams to turn conversations into code.

Slack Agent is built on CodeRabbit's deep understanding of your code, so your team can collaborate across the entire SDLC without losing context.

  • Generate code and open pull requests
  • Plan features and break down work
  • Investigate incidents and troubleshoot customer tickets together
  • Automate recurring tasks and respond to alerts with triggers
  • Summarize progress and report instantly

Built for teams:

  • Shared memory across your entire org—no repeating context
  • Per-thread sandboxes to safely plan and execute work
  • Governance built-in—scoped access, auditability, and budget controls

One agent for your entire SDLC. Right inside Slack.

👉 Get started


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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@dosubot dosubot Bot added the quality-of-life QoL improvements label May 12, 2026

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request updates the resource configuration for the CSI deployment in the Kubernetes application package, adding resource limits and increasing the CPU and memory requests. The review feedback identifies that the PR title and release note block do not comply with the repository's Conventional Commits and formatting standards as defined in the style guide.

name: kubeconfig
readOnly: true
resources:
limits:

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

low

The PR does not fully adhere to the repository's commit and PR requirements:

  1. Commit/PR Title Format: The title [kubernetes] ... should follow the Conventional Commits format: type(scope): description. For example: fix(kubernetes): add CPU/memory limits to csi-resizer sidecar.
  2. Release Note Format: The release note block should follow the type(scope): human-readable changelog entry format instead of a full sentence.
References
  1. Each commit must follow Conventional Commits format: type(scope): brief description. (link)
  2. PR body must contain a release note block: type(scope): human-readable changelog entry. (link)

@lexfrei Aleksei Sviridkin (lexfrei) added the kind/cleanup Categorizes issue or PR as related to cleanup of code, process, or technical debt label Jul 3, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The new limits (512m/512Mi) and requests (125m/128Mi) match the other six containers in the same kcsi-controller Deployment exactly, so the resizer stops being the odd one out and the "no CPU limit" warning clears. I verified all sibling blocks in the template carry identical values, so this is a consistent, low-risk alignment. Only nit: the title uses a [scope] prefix rather than the repo's Conventional Commits format (fix(kubernetes): …), which the auto-labeler relies on.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Re-approving so the API Review Gate re-runs against the fixed workflow on main — its earlier red was the merge-base build bug (#3192), resolved by #3193.

The csi-resizer container was the only sidecar in the kcsi-controller
Deployment without resources.limits, triggering a 'no CPU limit'
conformance warning. Align it with the other six CSI sidecars in the
same Deployment (limits 512m/512Mi, requests 125m/128Mi) so capacity
planning and audits stay uniform.

Signed-off-by: Matthieu <[email protected]>
@lexfrei
Aleksei Sviridkin (lexfrei) force-pushed the fix/kubernetes-csi-resizer-cpu-limit branch from b2ff024 to 50c4080 Compare July 3, 2026 16:04
@lexfrei
Aleksei Sviridkin (lexfrei) merged commit b2d00af into cozystack:main Jul 3, 2026
13 of 15 checks passed
Aleksei Sviridkin (lexfrei) added a commit that referenced this pull request Jul 3, 2026
## Summary

The `s3manager` container in
`packages/system/bucket/templates/deployment.yaml` had no `resources`
block, triggering a `no CPU limit` conformance warning on the bucket UI
Deployment.

The bucket package is a standalone chart (no vendored upstream), so the
values are set directly in the template — same pattern as the
csi-resizer fix in #2614 and the existing `capi-providers-cpprovider`
template.

- `limits` : `cpu: 500m`, `memory: 512Mi`
- `requests` : `cpu: 100m`, `memory: 128Mi`

Comfortable headroom for the lightweight S3 browser UI while keeping a
small baseline request.

## Test plan

- [ ] `helm template . --show-only templates/deployment.yaml` from
`packages/system/bucket/` renders the `resources` block on the
`s3manager` container (verified locally)
- [ ] Re-run the conformance/lint tool — the `s3manager has no CPU
limit` warning should be gone
- [ ] CI passes

### Release note

\`\`\`release-note
Add CPU and memory requests/limits to the s3manager container of the
bucket UI Deployment to clear the "no CPU limit" conformance warning.
\`\`\`

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

* **Chores**
* Improved deployment configuration with explicit resource allocation
settings to ensure optimal service stability and resource management.

[![Review Change
Stack](https://storage.googleapis.com/coderabbit_public_assets/review-stack-in-coderabbit-ui.svg)](https://app.coderabbit.ai/change-stack/cozystack/cozystack/pull/2624)

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
Aleksei Sviridkin (lexfrei) added a commit that referenced this pull request Jul 3, 2026
## Summary

The `matchbox` container in
`packages/extra/bootbox/templates/matchbox/deployment.yaml` had no
`resources` block, triggering a `no CPU limit` conformance warning on
the `bootbox-matchbox` Deployment (PXE/iPXE provisioning service).

Bootbox is a standalone chart (no vendored upstream), so the values are
set directly in the template — same pattern as #2614 (csi-resizer) and
#2624 (s3manager).

- `limits` : `cpu: 200m`, `memory: 256Mi`
- `requests` : `cpu: 50m`, `memory: 128Mi`

Modest sizing since matchbox is a lightweight HTTP server serving iPXE
profiles and boot assets from ConfigMaps.

## Test plan

- [ ] `helm template bootbox . --namespace tenant-root --show-only
templates/matchbox/deployment.yaml --set _namespace.host=example.com
--set _cluster.solver=letsencrypt` from `packages/extra/bootbox/`
renders the `resources` block on the `matchbox` container (verified
locally)
- [ ] Re-run the conformance/lint tool — the `matchbox has no CPU limit`
warning should be gone
- [ ] CI passes

### Release note

\`\`\`release-note
Add CPU and memory requests/limits to the matchbox container of the
bootbox Deployment to clear the "no CPU limit" conformance warning.
\`\`\`

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

* **Chores**
* Added Kubernetes resource limits and requests configuration to
optimize container resource allocation and improve deployment stability.

[![Review Change
Stack](https://storage.googleapis.com/coderabbit_public_assets/review-stack-in-coderabbit-ui.svg)](https://app.coderabbit.ai/change-stack/cozystack/cozystack/pull/2625)

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/kubernetes Issues or PRs related to the tenant Kubernetes app kind/cleanup Categorizes issue or PR as related to cleanup of code, process, or technical debt quality-of-life QoL improvements size/XS This PR changes 0-9 lines, ignoring generated files

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants