feat(k8s): remove CPU limit from init/sidecar container#16207
Merged
lukidzi merged 4 commits intokumahq:masterfrom Apr 13, 2026
Merged
feat(k8s): remove CPU limit from init/sidecar container#16207lukidzi merged 4 commits intokumahq:masterfrom
lukidzi merged 4 commits intokumahq:masterfrom
Conversation
Signed-off-by: Lukasz Dziedziak <lukidzi@gmail.com>
Contributor
There was a problem hiding this comment.
Pull request overview
This PR removes default CPU limits from the kuma-init and kuma-sidecar containers to prevent CPU throttling that increases latency under load. The limits are set to 0 (no limit), while users can manually configure them through new configuration options. The change includes comprehensive updates to configuration, Helm charts, test data, and test infrastructure.
Changes:
- Default CPU limits removed from both init and sidecar containers (previously
100mand1000m) - New configuration structures added for init container resource limits/requests with full validation
- Test infrastructure simplified by removing the
E2EKuma()function andWithKumaInitNoCPULimit()test helper (no longer needed since limits are removed by default) - All golden files and test data updated to reflect new defaults
- Helm values and templates updated with new configuration options
- Migration guide added to UPGRADE.md
Reviewed changes
Copilot reviewed 164 out of 166 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
UPGRADE.md |
Documents the breaking change and provides migration instructions |
pkg/config/plugins/runtime/k8s/config.go |
Adds new InitContainerResources, InitContainerResourceLimits, and InitContainerResourceRequests config types with proper validation and environment variable support |
pkg/plugins/runtime/k8s/webhooks/injector/injector.go |
Implements initContainerLimits() and initContainerRequests() helper functions to handle resource configuration, properly handling zero CPU limits |
pkg/plugins/runtime/k8s/containers/factory.go |
Adds sidecarLimits() helper function and updates sidecar concurrency calculation to handle zero CPU limits |
test/framework/ |
Removes E2EKuma() function and WithKumaInitNoCPULimit() option since CPU limits are now removed by default |
test/e2e/ |
Updates all test files to use Kuma() instead of E2EKuma() |
deployments/charts/kuma/ |
Updates Helm values, templates, and documentation to include resource configuration options |
| Test data files | Updates ~200+ golden files and configuration testdata files to reflect new resource defaults |
Contributor
Reviewer Checklist🔍 Each of these sections need to be checked by the reviewer of the PR 🔍:
|
lobkovilya
reviewed
Apr 10, 2026
Signed-off-by: Lukasz Dziedziak <lukidzi@gmail.com>
Automaat
approved these changes
Apr 10, 2026
lukidzi
added a commit
that referenced
this pull request
Apr 14, 2026
## Motivation This change wasn't introduced in #16207 ## Implementation information * remove cpu limit from kuma-validation container * add option to configure in helm and env variable * updated tests * improved UPGRADE.md --------- Signed-off-by: Lukasz Dziedziak <lukidzi@gmail.com>
Automaat
pushed a commit
that referenced
this pull request
Apr 14, 2026
## Motivation CPU limits cause throttling even when CPU is available, which increases latency under load. Removing the limit allows the containers to burst during startup and high-traffic periods. ## Implementation information The default CPU limit for injected `kuma-init` and `kuma-sidecar` containers has been removed (set to `0`, meaning no limit). Previously the defaults were `100m` and `1000m` respectively. New configuration options were introduced and user is able to set them manually. --------- Signed-off-by: Lukasz Dziedziak <lukidzi@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
CPU limits cause throttling even when CPU is available, which increases latency under load. Removing the limit allows the containers to burst during startup and high-traffic periods.
Implementation information
The default CPU limit for injected
kuma-initandkuma-sidecarcontainers has been removed (set to0, meaning no limit). Previously the defaults were100mand1000mrespectively. New configuration options were introduced and user is able to set them manually.