Skip to content

Commit 6252aa1

Browse files
authored
rfc-0006: add driver config passthrough proposal (#1589)
* docs(rfc): add driver config passthrough proposal Signed-off-by: Evan Lezar <elezar@nvidia.com> * docs(rfc): link driver config proposal PR Signed-off-by: Evan Lezar <elezar@nvidia.com> * docs(rfc): clarify driver config scope Signed-off-by: Evan Lezar <elezar@nvidia.com> * docs(rfc): clarify driver-local config schemas Signed-off-by: Evan Lezar <elezar@nvidia.com> * docs(rfc): clarify driver config extension path * docs(rfc): update driver config baseline * docs(drivers): document bind-mount selinux_label and whitespace rules --------- Signed-off-by: Evan Lezar <elezar@nvidia.com>
1 parent f852d07 commit 6252aa1

5 files changed

Lines changed: 449 additions & 25 deletions

File tree

crates/openshell-driver-docker/README.md

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -56,12 +56,15 @@ paths to sandbox requests. Image mounts are not part of the Docker
5656
driver-config schema. The driver still uses internal bind mounts for
5757
OpenShell-owned supervisor, token, and TLS material.
5858

59-
Docker `bind` mounts accept `source`, `target`, and optional `read_only`.
60-
Docker `volume` mounts may include `subpath`. User-supplied bind and volume
61-
mounts are read-only by default; set `read_only: false` to make them writable.
62-
Mount targets must be absolute container paths and must not replace the
63-
workspace root (`/sandbox`) or overlap OpenShell supervisor files,
64-
`/etc/openshell`, `/etc/openshell-tls`, or `/run/netns`.
59+
Docker `bind` mounts accept `source`, `target`, optional `read_only`, and an
60+
optional `selinux_label` of `shared` (applies `:z`) or `private` (applies
61+
`:Z`) for SELinux-enforcing hosts. Docker `volume` mounts may include
62+
`subpath`. User-supplied bind and volume mounts are read-only by default; set
63+
`read_only: false` to make them writable. Mount `source`, `target`, and
64+
`subpath` values must not contain surrounding whitespace. Mount targets must be
65+
absolute container paths and must not replace the workspace root (`/sandbox`)
66+
or overlap OpenShell supervisor files, `/etc/openshell`, `/etc/openshell-tls`,
67+
or `/run/netns`.
6568

6669
Example named-volume usage:
6770

crates/openshell-driver-kubernetes/README.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -70,10 +70,11 @@ for `nvidia.com/gpu` and requests the configured GPU count in the workload spec.
7070
When no count is set, the driver requests one GPU resource. The sandbox image
7171
must provide the user-space libraries needed by the agent workload.
7272

73-
## Driver Config POC
73+
## Driver Config
7474

75-
The RFC 0005 POC accepts the selected `SandboxTemplate.driver_config.kubernetes`
76-
block as `DriverSandboxTemplate.driver_config`. The Kubernetes driver owns the
75+
Following RFC 0006, this driver accepts the selected
76+
`SandboxTemplate.driver_config.kubernetes` block as
77+
`DriverSandboxTemplate.driver_config`. The Kubernetes driver owns the
7778
nested schema and currently accepts:
7879

7980
- `pod.node_selector`
@@ -97,7 +98,7 @@ openshell sandbox create \
9798
```
9899

99100
Resource keys use native Kubernetes resource names and quantity strings. The
100-
POC parser renders the keys listed above and rejects unknown fields.
101+
parser renders the keys listed above and rejects unknown fields.
101102
`pod.runtime_class_name` maps to PodSpec `runtimeClassName` and overrides the
102103
driver's configured `default_runtime_class_name`; the typed public
103104
`SandboxTemplate.runtime_class_name` still takes precedence when set. Use the

crates/openshell-driver-podman/README.md

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -71,13 +71,15 @@ Host bind mounts are disabled by default because they expose gateway host paths
7171
to sandbox requests. The driver still uses internal bind mounts for
7272
OpenShell-owned token and TLS material.
7373

74-
Podman `bind` mounts accept `source`, `target`, and optional `read_only`.
75-
User-supplied bind and volume mounts are read-only by default; set
76-
`read_only: false` to make them writable. Podman image and volume mounts do not
77-
support `subpath` in OpenShell driver config. Mount targets must be absolute
78-
container paths and must not replace the workspace root (`/sandbox`) or overlap
79-
OpenShell supervisor files, `/etc/openshell`, `/etc/openshell-tls`, or
80-
`/run/netns`.
74+
Podman `bind` mounts accept `source`, `target`, optional `read_only`, and an
75+
optional `selinux_label` of `shared` (applies `:z`) or `private` (applies
76+
`:Z`) for SELinux-enforcing hosts. User-supplied bind and volume mounts are
77+
read-only by default; set `read_only: false` to make them writable. Podman
78+
image and volume mounts do not support `subpath` in OpenShell driver config.
79+
Mount `source` and `target` values must not contain surrounding whitespace.
80+
Mount targets must be absolute container paths and must not replace
81+
the workspace root (`/sandbox`) or overlap OpenShell supervisor files,
82+
`/etc/openshell`, `/etc/openshell-tls`, or `/run/netns`.
8183

8284
Example named-volume usage:
8385

docs/reference/sandbox-compute-drivers.mdx

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -166,10 +166,11 @@ Docker mount schema:
166166
| `volume` | `source`, `target`, optional `read_only` (`true` by default), optional `subpath`. The named volume must already exist. Docker local-driver bind-backed volumes require `enable_bind_mounts = true`. |
167167
| `tmpfs` | `target`, optional `options`, optional `size_bytes`, optional `mode`. |
168168

169-
OpenShell rejects mount targets that replace the workspace root, container root,
170-
supervisor files, `/etc/openshell`, `/etc/openshell-tls`, authentication
171-
material, or network namespace paths. These checks do not make host bind mounts
172-
safe.
169+
OpenShell rejects mount `source`, `target`, and Docker volume `subpath` values
170+
with surrounding whitespace. OpenShell also rejects mount targets that replace
171+
the workspace root, container root, supervisor files, `/etc/openshell`,
172+
`/etc/openshell-tls`, authentication material, or network namespace paths. These
173+
checks do not make host bind mounts safe.
173174

174175
## Podman Driver
175176

@@ -233,10 +234,11 @@ Podman mount schema:
233234
| `image` | `source`, `target`, optional `read_only` (`true` by default). |
234235

235236
Podman `volume` and `image` mounts do not support `subpath` in OpenShell driver
236-
config. OpenShell rejects mount targets that replace the workspace root,
237-
container root, supervisor files, `/etc/openshell`, `/etc/openshell-tls`,
238-
authentication material, or network namespace paths. These checks do not make
239-
host bind mounts safe.
237+
config, and OpenShell rejects `subpath` for those mount types. OpenShell rejects
238+
mount `source` and `target` values with surrounding whitespace. OpenShell also
239+
rejects mount targets that replace the workspace root, container root, supervisor
240+
files, `/etc/openshell`, `/etc/openshell-tls`, authentication material, or
241+
network namespace paths. These checks do not make host bind mounts safe.
240242

241243
## MicroVM Driver
242244

0 commit comments

Comments
 (0)