Uh oh!
There was an error while loading. Please reload this page.
feat(cli): add CPU/memory resource limit flags to sandbox create - #1063
Closed
nvshridhar wants to merge 1 commit into
Closed
feat(cli): add CPU/memory resource limit flags to sandbox create#1063nvshridhar wants to merge 1 commit into
nvshridhar wants to merge 1 commit into
Conversation
All contributors have signed the DCO ✍️ ✅ |
nvshridhar
commented
Apr 29, 2026
Author
I have read the DCO document and I hereby sign the DCO. |
nvshridhar
commented
Apr 29, 2026
Author
rcheck |
drew
previously approved these changes
May 4, 2026
Add four new optional CLI flags to openshell sandbox create: --cpu-request, --cpu-limit, --memory-request, --memory-limit These map to Kubernetes resource requests/limits via the existing DriverResourceRequirements proto fields and K8s driver. When omitted, behavior is unchanged (default K8s resource allocations). Includes ResourceArgs struct, prost_types::Struct serialization, unit tests, and integration test updates. ClosesNVIDIA#1003 Signed-off-by: Shridhar Damale <sdamale@nvidia.com> Made-with: Cursor Co-authored-by: Cursor <cursoragent@cursor.com>
nvshridharforce-pushed
the
feat/1003-cpu-ram-resource-flags/nvshridhar
branch
from
May 5, 2026 04:08
a67790e to
7cce3f8Comparenvshridhar
commented
May 5, 2026
Author
recheck |
drew
approved these changes
May 5, 2026
nvshridhar
commented
May 14, 2026
Author
Closing as following the the direction - |
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 freeto 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.
Summary
Add four optional CLI flags (
--cpu-request,--cpu-limit,--memory-request,--memory-limit) toopenshell sandbox create. These map to Kubernetes resource requests/limits via the existingDriverResourceRequirementsproto fields and K8s driver. When omitted, behavior is unchanged.Related Issue
Closes#1003
Changes
crates/openshell-cli/src/main.rs: 4 new Clap args underRESOURCE FLAGShelp heading, threaded through tosandbox_createandsandbox_create_with_bootstrapcrates/openshell-cli/src/run.rs: NewResourceArgsstruct withto_resources_struct()that builds theprost_types::Structshape expected by the gateway server. FixedSandboxTemplateconstruction to create a template when resources are specified even without a custom imagecrates/openshell-cli/tests/sandbox_create_lifecycle_integration.rs: Updated 5 call sites with&run::ResourceArgs::default()to match new function signaturesTesting
cargo check -p openshell-cli --testspasses (lib + all integration tests)kubectl describe pod, confirmed memory OOM at limit (exit 137), confirmed CPU throttle with 4 coresKnown limitation
No client-side validation of K8s quantity strings or request-vs-limit ordering. Invalid values are rejected by the K8s API server at pod creation time with a clear error. Client-side parsing of K8s quantities (millicores, binary suffixes) is out of scope for this PR.
Checklist
Made with Cursor