Fix #6508: Add resource request/limit support for init and sidecar containers - #6721
Open
641-git641 wants to merge 2 commits into
Open
Fix #6508: Add resource request/limit support for init and sidecar containers#6721641-git641 wants to merge 2 commits into
641-git641 wants to merge 2 commits into
Conversation
…car containers Co-Authored-By: Claude Code on behalf of 641-git641
Contributor
|
✔️ Unit test coverage report - coverage increased from 63.1% to 63.2% (+0.1%) |
squakez
reviewed
Jul 28, 2026
squakez
left a comment
Contributor
There was a problem hiding this comment.
LGTM. Just fix the lint warnings. Also, it would be good to clarify what happens when you have mixed arguments and provide a test for it, for example my-task;my-image;my-command:request-cpu=123m
| if len(strings.TrimSpace(seg)) == 0 { | ||
| continue | ||
| } | ||
| if strings.Contains(seg, "=") { |
Contributor
There was a problem hiding this comment.
Feel free to add a nolint statement to avoid the warn
Author
There was a problem hiding this comment.
Addressed: added //nolint:nestif, fixed the if-else chain, and added tests for mixed format (my-task;my-image;my-command;request-cpu=123m). PTAL.
- Replace if-else chain with switch (gocritic) - Add //nolint:nestif for key=value parsing block - Add tests for mixed positional + key=value format (e.g. my-task;my-image;my-command;request-cpu=123m)
641-git641
force-pushed
the
feature/6508-init-container-resources
branch
from
July 28, 2026 14:10
f32cde5 to
39f83c2
Compare
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.
The existing positional format (
name;image;command) continues to work unchanged.Changes
containerTaskstruct: added 4 new fieldsparseSingleTask(): parses key=value resource keys withresource.ParseQuantityvalidationconfigureContainers(): setscorev1.ResourceRequirementswhen resource fields are present6 new unit tests covering full resources, partial resources, invalid values, end-to-end apply, and backward compatibility
Fixes #6508
AI Generated with Claude Code on behalf of 641-git641