Skip to content

feat(common/resources)!: drop cpu limits by default#1987

Merged
cwrau merged 1 commit intomainfrom
feat/common/drop-cpu-limits
Feb 18, 2026
Merged

feat(common/resources)!: drop cpu limits by default#1987
cwrau merged 1 commit intomainfrom
feat/common/drop-cpu-limits

Conversation

@cwrau
Copy link
Member

@cwrau cwrau commented Feb 12, 2026

chore!: remove unused resourcesWithPreset function

Summary by CodeRabbit

  • New Features

    • Added setCPULimits configuration option to control CPU limit inclusion in resource presets.
  • Behavior Changes

    • Resource presets now omit CPU limits by default; enable them using the new configuration flag.

Copilot AI review requested due to automatic review settings February 12, 2026 11:07
@cwrau cwrau enabled auto-merge February 12, 2026 11:07
@gemini-code-assist
Copy link

Summary of Changes

Hello @cwrau, 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 refines how resource requests and limits are handled within Helm charts, specifically by altering the default behavior for CPU limits. The primary goal is to improve application stability by not imposing CPU limits by default, while still providing an option to enable them. Additionally, an obsolete helper function has been cleaned up.

Highlights

  • Default CPU Limits: CPU limits are no longer set by default when using resource presets. This change aims to prevent potential issues caused by CPU throttling, as CPU is a compressible resource.
  • Conditional CPU Limit Application: A new parameter, setCPULimits, has been introduced to the common.resources template. Users can explicitly set this to true if they wish to apply CPU limits from a preset.
  • Removed Unused Function: The common.resourcesWithPreset function, which was previously used to pass resource configurations, has been removed as it was no longer utilized.
Changelog
  • charts/common/templates/_resources.tpl
    • Modified the common.resources template to conditionally omit CPU limits from resource presets unless setCPULimits is explicitly set to true.
    • Updated the documentation comments for common.resources to reflect the new default behavior and the setCPULimits parameter.
    • Removed the common.resourcesWithPreset template function.
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-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 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 counter productive. You can react with 👍 and 👎 on @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.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

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.

@coderabbitai
Copy link

coderabbitai bot commented Feb 12, 2026

Warning

Rate limit exceeded

@cwrau has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 7 minutes and 57 seconds before requesting another review.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

📝 Walkthrough

Walkthrough

A Helm chart template file is refactored to consolidate resource preset handling. The dedicated common.resourcesWithPreset helper is removed and its functionality is integrated into the main common.resources definition with a new setCPULimits flag that conditionally controls whether CPU limits are included from presets.

Changes

Cohort / File(s) Summary
Helm Chart Resource Template
charts/common/templates/_resources.tpl
Removed the common.resourcesWithPreset helper and enhanced common.resources to conditionally omit CPU limits from presets when setCPULimits is not true. Preset loading now occurs with conditional CPU limit filtering before merging with existing resources.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Suggested reviewers

  • tasches
  • marvinWolff
  • teutonet-bot

Poem

🐰 A preset was pondering its CPU fate,
When a flag came to decide its weight,
No limits by default, we say with glee,
Unless setCPULimits sets them free! ✨
One helper removed, logic consolidated,
Our templates are cleaner, well-formatted!

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'feat(common/resources)!: drop cpu limits by default' accurately summarizes the main change: CPU limits are dropped by default in the common/resources component.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

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

✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch feat/common/drop-cpu-limits

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.

Copy link

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

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 introduces a breaking change by removing the common.resourcesWithPreset template function and modifying the common.resources template to drop CPU limits from resource presets by default. A new setCPULimits flag is introduced to re-enable them. While the logic for dropping CPU limits is sound, I've found a critical issue in the implementation where the merge order of resources is incorrect, causing preset values to override user-provided values. This needs to be fixed to ensure user configurations are respected.

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Updates the shared Helm library resources helper to stop setting CPU limits by default when using resource presets, aligning with the intent to avoid CPU throttling issues unless explicitly opted into.

Changes:

  • Adjust common.resources to remove preset CPU limits unless setCPULimits is enabled.
  • Remove the unused common.resourcesWithPreset helper template.
  • Update the template doc comment to describe the new default behavior.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@cwrau cwrau force-pushed the feat/common/drop-cpu-limits branch 2 times, most recently from 75ee153 to 5a1f2e1 Compare February 12, 2026 11:17
chore!: remove unused resourcesWithPreset function
@cwrau cwrau force-pushed the feat/common/drop-cpu-limits branch from 5a1f2e1 to b2cc5b8 Compare February 12, 2026 11:18
@cwrau cwrau added this pull request to the merge queue Feb 18, 2026
Merged via the queue into main with commit d4564a5 Feb 18, 2026
20 checks passed
@cwrau cwrau deleted the feat/common/drop-cpu-limits branch February 18, 2026 16:00
github-merge-queue bot pushed a commit that referenced this pull request Feb 24, 2026
🤖 I have created a release *beep* *boop*
---


##
[2.0.0](common-v1.8.0...common-v2.0.0)
(2026-02-24)


### ⚠ BREAKING CHANGES

* **common/resources:** drop cpu limits by default
([#1987](#1987))

### Features

* **common/resources:** drop cpu limits by default
([#1987](#1987))
([d4564a5](d4564a5))


### Miscellaneous Chores

* **common/dependencies:** update helm release common to v2.34.0
([#1965](#1965))
([af9e6b3](af9e6b3))
* **common/dependencies:** update helm release common to v2.36.0
([#1983](#1983))
([0b5e540](0b5e540))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

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

## Summary by CodeRabbit

* **Breaking Changes**
* Default CPU limits have been removed from the common chart. Update
your deployment configurations if you currently rely on these limits.

* **Chores**
  * Updated helm dependencies to v2.34.0 and v2.36.0.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants