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
feat(driver-podman): add per-sandbox user namespace mode
Add a `userns_mode` field to `PodmanSandboxDriverConfig` so each
sandbox can independently select its user namespace mode via
`--driver-config-json`.
Accepts the same values as `podman run --userns`, e.g. "keep-id",
"keep-id:uid=200,gid=210", "auto", "nomap", or "host". Empty (default)
leaves Podman's default behavior unchanged.
The `build_userns` helper reads from the per-sandbox driver config
and parses the string into a libpod `Namespace` object, splitting on
the first colon: the left side becomes `nsmode` and the right side
becomes `value`. When unset or whitespace-only, the `userns` field is
omitted from the container spec JSON so Podman uses its default
(host namespace).
Includes unit tests covering all parsing paths, whitespace trimming,
and coexistence with mounts in driver config. Updates the driver
README with usage examples.
Signed-off-by: Florian Bergmann <bergmann.f@gmail.com>
Copy file name to clipboardExpand all lines: docs/reference/sandbox-compute-drivers.mdx
+3-1Lines changed: 3 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -179,10 +179,12 @@ The gateway talks to the Podman API socket. The Podman driver requires Podman 5.
179
179
180
180
For maintainer-level implementation details, refer to the [Podman driver README](https://github.com/NVIDIA/OpenShell/blob/main/crates/openshell-driver-podman/README.md) and [Podman networking notes](https://github.com/NVIDIA/OpenShell/blob/main/crates/openshell-driver-podman/NETWORKING.md).
181
181
182
-
Select Podman with `compute_drivers = ["podman"]` in `[openshell.gateway]`. Configure Podman driver values such as `socket_path`, `network_name`, `supervisor_image`, `stop_timeout_secs`, `image_pull_policy`, `grpc_endpoint`, `host_gateway_ip`, `sandbox_ssh_socket_path`, `sandbox_pids_limit`, and `guest_tls_*` in `[openshell.drivers.podman]`.
182
+
Select Podman with `compute_drivers = ["podman"]` in `[openshell.gateway]`. Configure Podman driver values such as `socket_path`, `network_name`, `supervisor_image`, `stop_timeout_secs`, `image_pull_policy`, `grpc_endpoint`, `host_gateway_ip`, `sandbox_ssh_socket_path`, `sandbox_pids_limit`, `guest_tls_*`, and `userns_mode` in `[openshell.drivers.podman]`.
183
183
184
184
On macOS with `podman machine`, the driver uses gvproxy's host-loopback IP, `192.168.127.254`, for sandbox host aliases by default. Set `host_gateway_ip` only when your Podman machine uses a non-standard host-loopback address. On Linux, an empty `host_gateway_ip` keeps Podman's `host-gateway` resolver behavior.
185
185
186
+
Set `userns_mode` in `[openshell.drivers.podman]` to run sandbox containers inside a user namespace. Accepts the same values as `podman run --userns`, such as `"keep-id"`, `"keep-id:uid=200,gid=210"`, `"auto"`, `"nomap"`, or `"host"`. Empty (default) leaves Podman's default behavior unchanged.
187
+
186
188
### Podman Driver Config Mounts
187
189
188
190
Podman driver config accepts user-supplied `volume`, `tmpfs`, and `image`
0 commit comments