-
Notifications
You must be signed in to change notification settings - Fork 32
Refine sandbox CRD design #23
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
Welcome @flpanbin! |
d0a3fee to
7ccbcf0
Compare
|
Thanks for sharing @flpanbin ! There's a lot going on here, and I think one of the principles of the Sandbox CRD as a kubernetes project is that it should follow the kube design patterns and be relatively unopinionated. So right now we are using PodTemplate, because that's what Deployment and StatefulSet and Daemonset do. We're consuming the whole thing, even though maybe some fields are less relevant, because we want to enable people to build more opinionated layers on top. (For example, lots of companies build their own BigcoDeployment on top of Deployment, with just the features they want) To move forwards I can think of these two ways:
|
7ccbcf0 to
5714e2d
Compare
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: flpanbin The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
1 similar comment
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: flpanbin The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
@justinsb Thanks for the thoughtful feedback. I fully understand your viewpoint on following the Kubernetes design pattern. First, let me explain the reason why we chose custom fields instead of directly using PodTemplateSpec.
I fully agree exposing PodTemplateSpec directly. The sandbox project’s scope is a general, Kubernetes-native abstraction for single-instance, stateful workloads; “developer environment” is just one use case on top of that. To improve the core Sandbox, I’d like to propose adding a few generic fields. Proposal: Add a few fields to Sandbox
Status implications
On alternative of creating a higher-level CRD example
We’re open to adjusting details based on community feedback. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@flpanbin Thanks for breaking down the features. It's good to discuss the APIs first and then add each feature one by one. In general we prefer smaller PRs that can be reviewed more quickly, less likely to introduce bugs, and easier to roll back if needed.
spec.networking
With #9, sandbox creates a headless service automatically. Adding a networking field could be good for users to customize the network layer further.
spec.schedule
There's a related design proposal for TTL #21 which handles a similar case but in a different way. Let's discuss which we prefer (or do we need both?)
In terms of field name, I'd just call it something more explicit, perhaps shutdownTime. The term "schedule" could be confused with node scheduling, and is less clear on what this schedule is for.
spec.pause
This looks interesting. Would you provide more details on how the state is saved when pausing and restored when resuming? How is it different from the shutdownTime/TTL (pausing saves state, and shutdown doesn't)? This change is likely bigger and might require multiple PRs.
|
@janetkuo Thanks for the feedback! You're absolutely right about smaller, focused PRs being easier to review and less risky. I completely agree with that approach. I will close the PR and submit issues and PRs separately for each feature. |
Related issue #22
Background
Following the meeting on September 10th, 2025, we discussed contributing our production-tested sandbox design to the Kubernetes community. This design has been successfully used in production environments.
Overview
This PR introduces the initial draft CRD design for the Sandbox custom resource, which aims to provide a declarative, standardized API for managing isolated, stateful, singleton workloads - particularly ideal for AI agent runtimes and development environments.
We welcome community feedback and will iterate on the CRD design based on comments and suggestions.
Call for Community Feedback
We're actively seeking input from the community on:
API Design: Are the field names and structure intuitive?
Missing Features: What additional capabilities should we consider?
Use Cases: How does this align with your specific requirements?
Compatibility: Any concerns with existing Kubernetes patterns?
Please share your thoughts, suggestions, and concerns in the comments below!