Repository navigation
feat(sandbox-manager): add OpenSandbox-compatible control-plane APIs - #1059
zhuangzhewei09 wants to merge 1 commit into
Conversation
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## master #1059 +/- ##
==========================================
+ Coverage 84.38% 84.49% +0.10%
==========================================
Files 273 296 +23
Lines 24550 26142 +1592
==========================================
+ Hits 20717 22089 +1372
- Misses 3041 3186 +145
- Partials 792 867 +75
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
69df6fa to
19da857
Compare
19da857 to
f4f275e
Compare
f4f275e to
04b5b4e
Compare
Expose creation, list, describe, delete, asynchronous pause/resume, expiration renewal and owned-instance endpoint discovery through the existing sandbox-manager listener, API-key storage and Manager. Support image cold creation, named SandboxSet claims and Checkpoint clones while retaining native E2B defaults and ownership policy. Persist lifecycle intent with version-checked partial patches and native coordination. Resolve ingress/direct endpoint addresses and credentials through a neutral Manager connection observation. Select compatibility runtime injection and initialize optional additional runtime ports with the native credential while preserving the default E2B init path. Define the complete control-plane proposal and keep command/file service implementations separate. Retain the nineteen official-SDK creation and lifecycle scenarios; deliver their cluster workflow with the compatible runtime image and injection environment. Validation on base 641b7d7: go test ./pkg/servers/opensandbox ./pkg/utils/runtime ./cmd/sandbox-manager -count=1 passed with Go 1.26.5. Proposal internal links and reference symbols resolve, and git diff --check passes. Cluster SDK cases were not rerun as part of this branch consolidation. Refs openkruise#690 Signed-off-by: zhuangzhewei09 <zhuangzhewei09@dingtalk.com>
04b5b4e to
16deb95
Compare
Define creation, identity, network access, lifecycle and endpoint-discovery contracts using native E2B orchestration. Include ingress/direct credential projection, runtime selection and additional-port initialization, source inheritance, observable differences and acceptance criteria. Limit this change to the proposal; all control-plane implementation and tests are maintained in PR openkruise#1059. Command/file service implementations and their runtime image remain a separate data-plane delivery. Validation: proposal content matches the control-plane implementation branch; internal anchors and official reference definitions resolve; git diff --check passes against base 0646203. Refs openkruise#690 Signed-off-by: zhuangzhewei09 <zhuangzhewei09@dingtalk.com>
Ⅰ. Describe what this PR does
Consolidate all OpenSandbox control-plane implementation in sandbox-manager: creation, list, describe, delete, asynchronous pause/resume, expiration renewal, and endpoint discovery. The opt-in adapter shares the existing HTTP listener, API-key storage and SandboxManager with E2B.
SandboxManager.GetSandboxConnection. Selectopensandbox-runtimefor cold creation and use optionalAdditionalInitPortsfor native-token initialization. Pool/Checkpoint workloads and initialization configuration retain source inheritance.Ⅱ. Does this pull request fix one issue?
Refs #690. This PR contains the complete current control-plane implementation and has no create-implementation dependency on #989. The published #989 still contains its earlier create implementation and proposal; reducing it to proposal-only remains pending. #1081 has not yet been rebuilt on this head.
Ⅲ. Describe how to verify it
Local checks passed on
16deb951018faf6923d7050da4de9b16d1d85003, base641b7d7efc2bc8ba11207ece0b0236caca8de79f, with Go 1.26.5:go test ./pkg/servers/opensandbox ./pkg/utils/runtime ./cmd/sandbox-manager -count=1Go 1.25.9 verification also passed: the runtime package passed, and the API/entrypoint packages passed with
-p 1after an initial disk-space failure during parallel linking. The source tree and commit remain unchanged.Coverage includes endpoint ownership and ingress/direct routing, lifecycle routes, creation mapping and additional initialization while retaining the native default path. Proposal links and whitespace checks passed. All nineteen SDK scenarios remain present; cluster E2E was not rerun during this consolidation.
Ⅳ. Special notes for reviews
The implementation is one signed commit. The retained base is six commits behind fetched master
ef1a626, including lifecycle hooks in #1116, tracing changes in #1127 and the dedicated metrics-listener health route in #1132. Shared call signatures were checked; validation above is bound to the retained base and must be repeated after base integration.Deployments using compatibility creation must provide the compatibility runtime image and injection configuration. Pool workloads must already include the compatibility service. Additional initialization uses HTTP and explicitly rejects TLS-only bridging. The complete SDK cluster environment is planned for a follow-up update to #1081; this PR retains the nineteen control-plane scenarios and independently runnable Go tests.
202 means accepted intent; describe may lag, and callers wait for Ready after resume. Real checkpoint/filesystem/CSI restoration, process-restart recovery and runtime initialization failure recovery retain separate deployment-backed verification. Description responses keep an empty entrypoint and omit startup-source fields.
Networking retains native allow-before-deny semantics, default access and publication order without a first-traffic barrier. Pool image/resources use native best-effort updates, snapshot configuration is inherited, PVCs must exist, and unsupported source/security/resource overrides retain the proposal's errors. Cold creation retains the native outer retry boundary. Signed endpoints and general Lifecycle Server Proxy requests return 501.