Skip to content

feat(compute): add apple-container driver#1888

Draft
shiju-nv wants to merge 1 commit into
NVIDIA:mainfrom
shiju-nv:feat/apple-container-driver
Draft

feat(compute): add apple-container driver#1888
shiju-nv wants to merge 1 commit into
NVIDIA:mainfrom
shiju-nv:feat/apple-container-driver

Conversation

@shiju-nv

Copy link
Copy Markdown
Contributor

Summary

Adds an opt-in apple-container compute driver for local macOS gateways. The driver shells out to Apple's container CLI, wires the OpenShell supervisor into Apple Container guests, and keeps the runtime explicit-only so existing Kubernetes, Podman, and Docker auto-detection behavior is unchanged.

Related Issue

Closes #1887

Changes

  • Add the openshell-driver-apple-container crate with Apple CLI JSON parsing, lifecycle operations, status mapping, watch polling, and a gRPC driver adapter.
  • Register apple-container in compute-driver configuration, telemetry, server runtime selection, gateway config parsing, and local mTLS defaults.
  • Keep Apple Container explicit-only; it is not auto-detected ahead of Kubernetes, Podman, or Docker.
  • Derive the default supervisor callback endpoint from the gateway bind port using host.container.internal, and register the discovered Apple Container network gateway listener when needed.
  • Stage sandbox JWT and optional guest TLS material in read-only host mounts instead of passing secrets through environment variables.
  • Reject partial guest TLS configuration and non-empty Apple driver_config payloads until the driver has a supported per-sandbox config schema.
  • Serialize compute create with delete/watch reconciliation so the store record cannot be pruned before backend creation starts.
  • Propagate user template labels to Apple Container runtime containers while preserving OpenShell-managed labels.
  • Add generated local TLS SAN coverage for the Apple host callback alias.
  • Document the Apple Container driver across installation, quickstart, gateway config, support matrix, compute runtime architecture, sandbox management, and compute-driver reference docs.
  • Add focused tests for parser behavior, resource validation, auth staging, lifecycle state mapping, server config wiring, and driver registration.

Testing

  • mise run pre-commit passes
  • Unit tests added/updated
  • E2E tests added/updated (if applicable)

Checklist

  • Follows Conventional Commits
  • Commits are signed off (DCO)
  • Architecture docs updated (if applicable)

Add an opt-in Apple Container compute driver for local macOS gateways.
The driver shells out to Apple's container CLI using JSON output where
available, creates per-sandbox containers with OpenShell supervisor
wiring, and reports lifecycle state through the existing compute-driver
contract.

Register the driver in gateway configuration, telemetry, and server
runtime selection. Derive the sandbox callback endpoint from the
gateway bind port so Apple Container guests can reach the gateway
through host.container.internal.

Cover the Apple host callback alias in generated local TLS server
certificates, and reject non-empty Apple driver_config payloads until
the driver has a supported per-sandbox config schema.

Keep Apple validation aligned with the Docker driver contract: validate
preflight-safe template/image fields before JWT minting, then enforce
the sandbox token only inside the create path after the gateway injects
it. Serialize compute create with delete and watch reconciliation so the
store record cannot be removed before backend creation starts.

Propagate user template labels to Apple Container runtime containers
while preserving OpenShell-managed labels, matching Docker and Podman
label behavior.

Document the driver, its CLI prerequisite, integer CPU-limit behavior,
TLS/JWT expectations, explicit driver selection, and supervisor delivery
model. Add focused parser, config, lifecycle, resource, and server
wiring tests.

Signed-off-by: Shiju <shiju@nvidia.com>
@copy-pr-bot

copy-pr-bot Bot commented Jun 12, 2026

Copy link
Copy Markdown

Auto-sync is disabled for draft pull requests in this repository. Workflows must be run manually.

Contributors can view more details about this message here.

@drew

drew commented Jun 12, 2026

Copy link
Copy Markdown
Collaborator

See #1887 (comment). Let's close for now. We can revisit once runtime improvements and topologies have started to materialize.

I don't see any E2E tests, so I'm also curious if this actually works with Apple's default kernel.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add Apple Container as an OpenShell compute backend

2 participants