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
{{ message }}
Repository navigation
bug(kubernetes): support OpenShift user namespaces and per-sandbox Pod identities #5785
I want to run OpenShell Kubernetes sandboxes with Pod user namespaces on OpenShift. I also want to configure UID, GID, and filesystem group for an individual sandbox when its image or workspace volume requires specific IDs.
Problem Statement
OpenShell's Kubernetes driver sets hostUsers: false when the sandbox template enables user namespaces. Identity resolution still uses the driver-wide UID/GID configuration or OpenShift namespace annotations, independent of the user-namespace flag. The generated Pod also sets fsGroup from the sandbox GID and supplies supplementalGroups: []. OpenShell v0.1.9 identity resolution · Generated Pod security context
An OpenShift namespace UID/GID allocation can fall outside the in-Pod range for Kubernetes user namespaces. The sandbox create API also has no per-instance UID, GID, or fsGroup fields. OpenShell sandbox API · Kubernetes user namespaces
Reproduction
Use the OpenShell Kubernetes driver on OpenShift with a sandbox service account eligible for the built-in restricted-v3 SCC.
Enable user_namespaces in a sandbox template and leave the gateway-wide UID/GID settings unset.
Inspect the generated Pod template for hostUsers: false, the selected UID/GID and fsGroup, and the supplemental groups list. Test admission with restricted-v3. OpenShift SCC documentation
Acceptance Criteria
OpenShell can start user-namespaced workload Pods with the built-in restricted-v3 SCC. Identity and group handling satisfy admission and preserve the gateway's post-admission security checks.
Operators can configure optional non-root UID, GID, and fsGroup for individual sandbox Pods using an authorized create or template path. Invalid IDs are rejected, and existing gateway defaults still work when the options are omitted.
Sandbox start and resume preserve the intended identity and workspace volume access. Tests cover OpenShift admission, distinct host mappings for two Pods, and retained volume access after resume.
Related work on namespace-scoped UID/GID defaults is tracked in #5494.
Activity