You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 2ab2a61
Browse filesBrowse the repository at this point in the historyBrowse files
feat(api)!: reuse resource requirements in workload templates
Align reusable workload templates with SandboxSpec by using the public ResourceRequirements message directly. Update SDK surfaces, generated bindings, CLI consumers, tests, and documentation.
Part of #2838
Signed-off-by: Evan Lezar <[email protected]>
Copy file name to clipboardExpand all lines: architecture/compute-runtimes.md
+10-9Lines changed: 10 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -253,20 +253,21 @@ delete, reconciliation removes the row; otherwise it can remain `Deleting`.
253
253
| VM | Experimental microVM isolation. | Per-sandbox libkrun VM. | Managed endpoint-backed driver. The gateway spawns `openshell-driver-vm`, waits for its Unix socket, and then consumes it through the same remote `compute_driver.proto` path used by unmanaged endpoint drivers. The VM driver boots a cached bootstrap `rootfs.ext4`, prepares requested OCI images inside a bootstrap VM with `umoci`, attaches the prepared image disk read-only, and gives each sandbox a writable `overlay.ext4` for merged-root changes and runtime material. The driver persists each accepted launch request beside the overlay and restarts those VMs on driver startup without recreating the overlay. |
254
254
| Extension | Out-of-tree drivers operated alongside the gateway. | Whatever boundary the driver implements. | Selected by a custom `compute_drivers = ["<name>"]` entry with `[openshell.drivers.<name>].socket_path`, or at launch time by pairing `--drivers <name>` with `--compute-driver-socket=<path>`. A launch-time endpoint may use a canonical built-in name to preserve its driver-config key while replacing in-process construction. The gateway connects to an operator-provisioned UDS, snapshots `GetCapabilities`, and dispatches all sandbox lifecycle calls through `compute_driver.proto`. The driver process and socket lifecycle are operator-owned; the gateway does not spawn, supervise, or remove unmanaged extension drivers. The trust boundary is the socket's filesystem permissions: the operator must ensure only the gateway uid can read/write it. |
255
255
256
-
Per-sandbox CPU and memory values currently enter the driver layer through
257
-
template resource limits. Docker and Podman apply them as runtime limits.
258
-
Kubernetes mirrors each limit into the matching request. VM accepts the fields
259
-
but currently ignores them.
256
+
Per-sandbox CPU, memory, and GPU requirements enter the driver layer through
257
+
the typed `ResourceRequirements` message. Docker and Podman apply CPU and
258
+
memory as runtime limits. Kubernetes mirrors each limit into the matching
259
+
request. VM and MXC reject unsupported CPU and memory requirements instead of
260
+
silently ignoring them.
260
261
261
262
Reusable sandbox workload templates are resolved before the compute-driver
262
263
boundary. Drivers do not receive a separate template resource; the gateway
263
264
lowers the selected `SandboxWorkloadTemplate` into the existing sandbox spec
264
265
and validates that spec before calling `ValidateSandboxCreate` or
265
-
`CreateSandbox`. Template CPU and memory become the same typed resource limits
266
-
described above. Template GPU settings become `ResourceRequirements`, preserving
267
-
the driver's default GPU assignment when the count is omitted. Template
268
-
`driver_config` remains a driver-keyed envelope until the compute layer selects
269
-
the active driver block and forwards only that block to the driver.
266
+
`CreateSandbox`. `SandboxWorkloadConfig.resources` reuses the public
267
+
`ResourceRequirements` message, so the gateway clones the typed requirements
268
+
directly into the resolved sandbox spec. Template`driver_config` remains a
269
+
driver-keyed envelope until the compute layer selects the active driver block
270
+
and forwards only that block to the driver.
270
271
271
272
Docker and Podman also accept per-sandbox driver-config mounts for existing
272
273
runtime-managed named volumes and tmpfs mounts. Podman additionally accepts
0 commit comments