Skip to content

Commit 9a1e04c

Browse files
docs: document per-driver compute-driver features
- README.md gains a "Choosing Which Compute Drivers Are Compiled In" section covering the four driver features, the extension-only build shape, and the startup-time compiled-out rejection. - architecture/compute-runtimes.md gains a "Compile-Time Driver Selection" section covering the four driver features, the extension-only zero-driver build, the startup-time missing-driver error, filtered auto-detection, and the always-available extension driver path. - docs/reference/gateway-config.mdx gains a matching reference section under "Choosing Which Drivers Are Compiled In" with a per-feature table, single-driver / mixed / extension-only build examples, and the startup-time rejection contract. Signed-off-by: Dimitar Mirchev <28221091+dimityrmirchev@users.noreply.github.com>
1 parent 6355e70 commit 9a1e04c

3 files changed

Lines changed: 80 additions & 1 deletion

File tree

README.md

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -252,12 +252,23 @@ OpenShell collects anonymous telemetry to help improve the project for developer
252252

253253
Disable telemetry at runtime by setting `OPENSHELL_TELEMETRY_ENABLED=false` on the gateway deployment. OpenShell propagates this deployment setting into sandbox supervisor environments so sandbox-side telemetry collection is disabled as well.
254254

255-
You can also compile telemetry out entirely. Telemetry support is a default-on `telemetry` Cargo feature; building with `--no-default-features` produces binaries that contain no telemetry endpoint, no telemetry HTTP client, and no emission code. Build telemetry-free artifacts with, for example, `cargo build --release -p openshell-server --no-default-features` (gateway) and the equivalent for `openshell-sandbox` and `openshell-driver-vm`. With telemetry compiled out, the gateway emits nothing and reports telemetry disabled to the sandboxes it launches.
255+
You can also compile telemetry out entirely. Telemetry support is a default-on `telemetry` Cargo feature; building `openshell-server` with `--no-default-features` and selecting only the driver features you need produces a gateway that contains no telemetry endpoint, no telemetry HTTP client, and no emission code. The gateway requires at least one compute driver to link; for example, `cargo build --release -p openshell-server --bin openshell-gateway --no-default-features --features driver-kubernetes,driver-docker,driver-podman,driver-vm` builds a telemetry-free gateway with every driver. Build telemetry-free `openshell-sandbox` and `openshell-driver-vm` binaries with a plain `--no-default-features`. With telemetry compiled out, the gateway emits nothing and reports telemetry disabled to the sandboxes it launches.
256256

257257
Telemetry events are limited to anonymous operational categories and counts, such as sandbox lifecycle outcomes, provider profile buckets, policy decision counts, and aggregate network activity denial categories. OpenShell telemetry does not collect sandbox names or IDs, hostnames, file paths, binary paths, prompts, credentials, provider names, model names, or user content.
258258

259259
Opting out applies only to telemetry emitted by OpenShell. Third-party services, model providers, inference endpoints, agents, or tools that you configure and use with OpenShell may have their own terms and privacy practices.
260260

261+
## Choosing Which Compute Drivers Are Compiled In
262+
263+
Each built-in compute driver — Kubernetes, Docker, Podman, VM — is gated by a Cargo feature on `openshell-server` (`driver-kubernetes`, `driver-docker`, `driver-podman`, `driver-vm`), all enabled by default. Operators who only need one driver can produce a slimmer gateway with a reduced supply-chain surface by building with `--no-default-features` and enabling the drivers they want:
264+
265+
```shell
266+
cargo build --release -p openshell-server --bin openshell-gateway \
267+
--no-default-features --features driver-kubernetes,telemetry
268+
```
269+
270+
Any non-empty driver subset is a valid build, including zero built-in drivers (an extension-only gateway that reaches an out-of-tree driver over `[openshell.drivers.<name>].socket_path`). What the gateway needs at *runtime* is a `compute_drivers` entry it can serve: either a built-in this binary was built with, or an extension driver name with a matching socket_path entry. Naming a built-in that this gateway was not built with fails at startup with a message naming both the driver and the Cargo flag that re-enables it. Extension drivers reached via `--compute-driver-socket` work regardless of the feature set. See the [gateway configuration reference](docs/reference/gateway-config.mdx) for details.
271+
261272
## Notice and Disclaimer
262273

263274
This software automatically retrieves, accesses or interacts with external materials. Those retrieved materials are not distributed with this software and are governed solely by separate terms, conditions and licenses. You are solely responsible for finding, reviewing and complying with all applicable terms, conditions, and licenses, and for verifying the security, integrity and suitability of any retrieved materials for your specific use case. This software is provided "AS IS", without warranty of any kind. The author makes no representations or warranties regarding any retrieved materials, and assumes no liability for any losses, damages, liabilities or legal consequences from your use or inability to use this software or any retrieved materials. Use this software and the retrieved materials at your own risk.

architecture/compute-runtimes.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,3 +117,27 @@ them without changing the sandbox architecture.
117117

118118
When runtime infrastructure changes, validate the relevant sandbox e2e path and
119119
update the matching driver README if a maintainer-facing constraint changes.
120+
121+
## Compile-Time Driver Selection
122+
123+
Each built-in runtime is gated by a Cargo feature on `openshell-server`:
124+
`driver-kubernetes`, `driver-docker`, `driver-podman`, `driver-vm`. All
125+
four are on by default, so the default gateway is byte-equivalent to
126+
before the feature split. Building `--no-default-features` and selecting a
127+
subset produces a gateway that carries only the requested drivers, along
128+
with their transitive dependencies and driver-specific plumbing (Docker's
129+
supervisor readiness impl, the K8s ServiceAccount authenticator, the VM
130+
subprocess launcher, and so on).
131+
132+
A zero-driver build is a supported extension-only gateway shape. It
133+
carries no in-tree driver code and speaks `compute_driver.proto` only to
134+
out-of-tree drivers named in `compute_drivers` with a matching
135+
`[openshell.drivers.<name>].socket_path`. A driver named in
136+
`gateway.toml` that this binary was not built with fails at startup with
137+
a message naming both the driver and the Cargo flag that re-enables it;
138+
auto-detection skips drivers that were compiled out and falls through to
139+
a "no suitable driver" error rather than silently picking a
140+
different backend. Extension drivers reached via
141+
`--compute-driver-socket` are always available regardless of driver
142+
features — they run out-of-process and the gateway only needs to speak
143+
`compute_driver.proto`.

docs/reference/gateway-config.mdx

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -340,3 +340,47 @@ compute_drivers = ["kyma"]
340340
[openshell.drivers.kyma]
341341
socket_path = "/run/openshell/kyma-compute-driver.sock"
342342
```
343+
344+
## Choosing Which Drivers Are Compiled In
345+
346+
Each built-in compute driver is gated by a Cargo feature on
347+
`openshell-server`, all enabled by default. Operators who only need one
348+
driver can produce a smaller gateway with a reduced supply-chain surface
349+
by building `--no-default-features` and selecting a subset:
350+
351+
| Feature | Compiles in |
352+
|---|---|
353+
| `driver-kubernetes` | Kubernetes driver, K8s ServiceAccount authenticator, `kube-rs` and K8s client dependencies. |
354+
| `driver-docker` | Docker driver, `bollard` and Docker-specific supervisor readiness plumbing. |
355+
| `driver-podman` | Podman driver and libpod REST client. |
356+
| `driver-vm` | In-server plumbing for spawning `openshell-driver-vm` and speaking to it over UDS. The driver binary itself is packaged separately. |
357+
| `telemetry` | Anonymous telemetry emission. |
358+
359+
Kubernetes-only gateway:
360+
361+
```shell
362+
cargo build --release -p openshell-server --bin openshell-gateway \
363+
--no-default-features --features driver-kubernetes,telemetry
364+
```
365+
366+
Docker + Podman gateway (drops K8s and VM code and their transitive
367+
dependencies):
368+
369+
```shell
370+
cargo build --release -p openshell-server --bin openshell-gateway \
371+
--no-default-features --features driver-docker,driver-podman,telemetry
372+
```
373+
374+
Extension-only gateway (no in-tree drivers; talks only to an out-of-tree
375+
driver over a Unix socket) with disabled telemetry:
376+
377+
```shell
378+
cargo build --release -p openshell-server --bin openshell-gateway --no-default-features
379+
```
380+
381+
This build carries no built-in driver code. `compute_drivers` must name an
382+
extension driver with a matching `[openshell.drivers.<name>].socket_path`.
383+
Configuring a driver in `gateway.toml` that this gateway was not built with fails at startup with a
384+
message naming both the driver and the Cargo flag that re-enables it.
385+
Extension drivers reached via `--compute-driver-socket` do not depend on any
386+
driver feature and work regardless.

0 commit comments

Comments
 (0)