feat(admin): add Template API for K8s Pool-based sandbox warm path - #1311
Open
Generalwin wants to merge 4 commits into
Open
feat(admin): add Template API for K8s Pool-based sandbox warm path#1311Generalwin wants to merge 4 commits into
Generalwin wants to merge 4 commits into
Conversation
Generalwin
force-pushed
the
e2b-style-template-implement
branch
from
August 5, 2026 03:09
be4487a to
352ef98
Compare
zhongwen666
reviewed
Aug 6, 2026
|
|
||
| template = copy.deepcopy(self._pool_template) | ||
|
|
||
| ctx: dict[str, Any] = { |
Collaborator
There was a problem hiding this comment.
ctx需要包含initcontainer的镜像
Collaborator
Author
There was a problem hiding this comment.
一个image字段就够了,可以渲染在init container
Generalwin
force-pushed
the
e2b-style-template-implement
branch
from
August 10, 2026 03:15
4d65ac6 to
a5f879b
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.
What does this PR do?
Implements Template API for sandbox warm pool management via K8s Pool CRD. Resolves #1310.
Changes
template_api.py): POST/GET/DELETE/apis/envs/sandbox/v1/templatesprovider.py): Pool informer +create_template/get_template_status/delete_templatemethodssandbox_manager.py): proxy methods for template operationsconfig.py):pool_templatefield for Jinja2-rendered Pool CRD configconstants.py): Pool CRD constants,TEMPLATE_ID_PREFIX = "tpl-", managed-by labelrequest.py/response.py):TemplateCreateRequest/TemplateStatusResponseDesign
templateID = tpl-{sha256(non-null spec fields)[:16]}— same spec always produces same IDavailable > 0→ ready,available == 0, total > 0→ buildingTesting
tests/unit/test_template_api.py): 19 cases — ID generation, Spec, Jinja2 rendering, status mapping, constantstests/smoke/test_template.py): lifecycle (create → wait ready → delete) + idempotent create, with--admin-urland--smoke-imageCLI options