Repository navigation
Description
User Story
We use OpenShell to run customer agent workloads on a managed platform built on Kubernetes. Customers provide their agents as OCI container images, including images in their own private registries. Only platform operators have gateway/control-plane access; tenants do not. We need customers to select the registry pull-Secret references for their agent images when creating sandboxes, without an operator updating shared gateway configuration for every customer registry. Our platform already handles secure credential collection and provisioning of the corresponding Kubernetes Secrets — this proposal concerns referencing those existing Secrets, not submitting credentials to OpenShell.
Problem Statement
The Kubernetes compute driver supports operator-configured, gateway-wide image_pull_secrets, but its per-sandbox driver_config.kubernetes schema does not expose image-pull Secret selection. A sandbox-creation request therefore cannot identify the existing Kubernetes Secret needed to pull that sandbox's private agent image, even when the platform has already provisioned it.
Impact / Why This Matters
The current workaround is for operators to provision customer registry Secrets and reference them in gateway-wide configuration. This couples customer onboarding and registry changes to shared control-plane administration rather than the customer's sandbox-creation workflow, and it implies customers disclose registry credentials to operators. For a multi-tenant platform that is an operational bottleneck: different customers need different credentials, but selecting a customer-specific Secret requires operator involvement and shared-config changes.
Proposed Design
Extend the per-sandbox driver_config.kubernetes schema with pod.image_pull_secrets, holding references to existing Kubernetes Secrets in the sandbox's workload namespace. Workflow:
- The platform provisions the customer's registry credentials as a Kubernetes Secret in the workload namespace and approves its use for the OpenShell workspace.
- The sandbox-creation request selects that Secret through
driver_config.kubernetes. - OpenShell verifies the reference is permitted and appends it to the workload Pod's
imagePullSecrets.
The behavior is additive: gateway-wide references are preserved and per-sandbox references appended without duplicates; requests omitting the field are unchanged. Caller-selected references must be gated by the existing allow_driver_config flag and the workspace-scoped external-resource admission model — image-pull Secrets are currently excluded from caller admission, so this requires revisiting that exclusion rather than assuming existing checks cover it. Namespace locality alone must not authorize another workspace's credentials. This proposal adds no credential upload, Secret creation, or cross-namespace copying.
Suggested UX
Illustrative public driver-configuration envelope (exact field shape open to maintainer feedback):
{ "kubernetes": { "pod": { "image_pull_secrets": ["customer-registry"] } } }Acceptance Criteria
- A caller can select existing image-pull Secrets through `driver_config.kubernetes` at sandbox creation, and the sandbox pulls its private agent image using an approved Secret in its workload namespace — no gateway-config change, no control-plane access, no gateway restart.
- Behavior is additive: gateway-wide references remain effective alongside per-sandbox references, without duplicates; requests omitting the field are unchanged.
- References respect `allow_driver_config` and are restricted to Secrets approved for the authorized workspace, including when workspaces share a namespace.
- Missing or unapproved references, malformed config, and unknown fields are rejected with clear errors, consistent with current driver-config behavior.
- The Kubernetes driver README and relevant published docs document the interface, additive behavior, approval/namespace requirements, and platform provisioning responsibility.
Alternatives Considered
- Gateway-wide `image_pull_secrets` (current): fine for operator defaults, but can't express per-customer selection at create time and requires shared-config changes as registries evolve.
- ServiceAccount-attached pull Secrets: provide identity-wide defaults for all Pods on that ServiceAccount, but can't express which credential an individual sandbox needs, still require operator action, and broaden the credential-sharing boundary across tenants.
- Middleware / interceptors / providers: runtime credential injection doesn't address the kubelet's earlier image-pull step and doesn't add the Kubernetes-driver field or authorization checks required here.
Activity
github-actions commentedon Dec 1, 2026
This issue has had no activity for 28 days and is now marked stale. It may be closed in 14 days if there is no further activity. Comment or remove the state:stale label to keep it open.
vassilnk commentedon Dec 1, 2026
The implementation for this is complete on a local branch and has been reassessed against current
main(@2b03ec2d).Summary of reassessment:
mainprovides only gateway-wide, operator-selected image-pull Secrets (PR feat(kubernetes): support sandbox image pull secrets #1671). Caller-selected per-sandbox selection — the gap this issue describes — is not addressed in 0.1.0 through 0.1.10, and no other open/merged issue or PR covers it.Requesting triage/acceptance so a PR can be opened.