Expand description
CRI runtime service implementation
Provides Kubernetes CRI-aligned APIs for managing pod sandboxes (Kata VMs) and containers. PodSandbox maps to a Kata VM, Container to an OCI container within that VM.
§Architecture
WorkerService (RequestService)
│
├── canonical RuntimeClient contract (`hyprstream-rpc-std`)
│ ├── run_pod_sandbox() → Creates Kata VM
│ ├── create_container() → Creates container in VM
│ ├── start_container() → Starts container
│ └── exec_sync() → Executes command
│
└── SandboxPool
├── Warm pool (pre-created VMs)
└── Active sandboxesRe-exports§
pub use backend::SandboxBackend;pub use backend::SandboxHandle;pub use exec_mount::ExecMount;pub use kata_backend::KataBackend;pub use kata_backend::KataHandle;pub use nspawn::NspawnBackend;pub use nspawn::NspawnConfig;pub use nspawn::NspawnHandle;pub use selection::backend_injects_9p_socket;pub use selection::require_9p_socket_capability;pub use selection::require_fuse_mount_capability;pub use selection::resolve_backend;pub use selection::resolve_backend_9p_capable;pub use selection::BackendCtx;pub use selection::BackendRegistration;pub use selection::explain_selection;pub use selection::BackendCandidate;pub use sandbox_fs::InjectedMounts;pub use sandbox_fs::SandboxFs;pub use sandbox_fs::SandboxFsLocalMount;pub use sandbox_fs::SandboxFsServer;pub use sandbox_fs::VFS_SOCKET_NAME;pub use wanix_workload::import_guest_namespace;pub use wanix_workload::inject_9p_socket;pub use wanix_workload::ImportedGuestNamespace;pub use wanix_workload::Injected9pServer;pub use wanix_workload::WanixGuestConfig;pub use wanix_workload::WanixInjection;pub use wanix_workload::ANN_WANIX_COMMAND;pub use wanix_workload::ENV_9P_SOCK;pub use wanix_workload::ENV_GUEST_EXPORT_SOCK;
Modules§
- backend
- SandboxBackend trait — pluggable sandbox runtime abstraction
- exec_
mount /exec/instances/VFS mount — projectsSandboxPool’s active sandboxes as a Plan9/proc-style tree.- kata_
agent - kata-agent ttrpc/vsock client — T1-C (#344) of the Worker GA epic (#341)
- kata_
backend - KataBackend — Kata Containers VM-based sandbox isolation
- nspawn
- NspawnBackend — systemd-nspawn based sandbox isolation
- sandbox_
fs - Per-sandbox VFS composition + serve (FS-D, #365).
- selection
- Inventory-based sandbox backend registry + fail-closed selection (#507).
- spawner
- Worker spawner abstraction for process management
- wanix_
workload - Wanix-guest workload wiring (#506, deliverable 3).
Structs§
- Admission
Config - Per-Subject / per-group admission quotas + wait-queue bounds + declared local schedulable capacity (#525 P2).
- Container
- Runtime representation of a container
- Deny
Unknown Group Validator - Fail-closed default
GroupSelectorValidator: denies every non-empty group selector (no membership source is wired), permits the absent-selector (no-partition) case. This is the production default until a real membership-backed validator is wired — an unverified group can never partition capacity. - Envelope
Context - Context extracted from a verified SignedEnvelope.
- PodSandbox
- Runtime representation of a pod sandbox
- Pool
Stats - Pool statistics
- Sandbox
Pool - Sandbox pool for warm sandbox management
- Service
Handle - Handle for a running service
- Static
Group Membership - Reference
GroupSelectorValidatorbacked by a static in-memory membership set (group → member Subject keys). Models the authoritative bidirectional-consent membership fact without the PDS/discovery plumbing; a production deployment wires anis_member-backed impl instead. - Status
Response - Runtime status response (local composite, not in schema).
- Worker
Service - WorkerService handles requests from the canonical worker contract.
Constants§
- ANN_
GPU_ REQUEST - Annotation key: per-request GPU count demand (a plain non-negative
integer string, e.g.
"1"). Independent ofoci_backend’s existing booleanhyprstream.io/gpupassthrough flag — see module docs, point 4. - ANN_
GROUP - Annotation key: the group selector for this request (B′, #921 decision
5). This is not a trusted group claim — it only names which of the
groups the verified
Subjectprovably belongs to this request should be partitioned under. AGroupSelectorValidatorresolves it against the authoritative membership source; a selector the Subject is not a member of is rejected. See module docs, point 2. - RUNTIME_
NAME - CRI runtime name
- RUNTIME_
VERSION - CRI runtime version
Traits§
- Group
Selector Validator - Resolves an untrusted group selector against the verified
Subject’s membership (B′, ratified in #921 decision 5). - Request
Service - Trait for RPC services.