Repository navigation
feat(helm): split gateway and workspace namespace charts #2485
Description
Problem Statement
OpenShell now supports three Kubernetes workspace namespace modes through RFC
0011 and #2656:
shared: all workspaces use one configured namespace;managed: the gateway creates and deletes a namespace per workspace; andoperator: each workspace maps to a pre-provisioned namespace discovered by
label selector or allowlist file.
The remaining gap is Helm packaging and lifecycle ownership. The repository
still publishes one deploy/helm/openshell chart that combines the gateway
control plane with namespace-local sandbox prerequisites. Platform operators
therefore cannot install and upgrade one shared gateway independently from the
sandbox ServiceAccount, Role, RoleBinding, and NetworkPolicy owned by each
pre-provisioned application or tenant namespace.
This makes delegated workspace onboarding and GitOps ownership harder even
though the runtime can now map workspaces to multiple operator-managed
namespaces.
Proposed Design
Provide two independently installable and version-aligned charts while keeping
the current combined installation backward compatible:
- Gateway chart (
helm-chart)- Continue to deploy the gateway workload, Service, configuration,
PKI/database hooks, gateway ServiceAccount, and required cluster-scoped
runtime permissions. - Add a backward-compatible value such as
workspaceResources.enabled=falsethat omits resources owned by a
workspace namespace. - Keep the existing default (
true) so current installations render the
same topology.
- Continue to deploy the gateway workload, Service, configuration,
- Workspace chart (
openshell-workspace)- Install once in each platform-managed application or tenant namespace.
- Create only the sandbox ServiceAccount, namespaced Role and RoleBinding,
and namespace-local sandbox SSH NetworkPolicy. - Accept the shared gateway ServiceAccount name and namespace explicitly so
a RoleBinding can authorize a subject from another namespace. - Never create a namespace, gateway workload, or cluster-scoped resource.
- Release and documentation contract
- Publish both OCI charts at the same OpenShell chart version.
- Document one external namespace with
sharedmode and multiple
pre-provisioned namespaces withoperatormode. - Keep sandbox ServiceAccount naming aligned between the gateway and
workspace releases.
Acceptance Criteria
- Default gateway-chart renders retain the current object identities and
combined-install behavior. - Gateway-only mode omits exactly the sandbox ServiceAccount, namespaced Role,
RoleBinding, and NetworkPolicy. - The workspace chart renders those four namespace-local resources and no
gateway or cluster-scoped resource. - A workspace RoleBinding can reference a gateway ServiceAccount in another
namespace. - Automated render tests prove the gateway-only and workspace releases do not
claim the same Kubernetes object. - Helm lint, generated documentation, unit tests, and OCI packaging cover both
charts.
Scope Boundary
This RFE defines the chart and release ownership boundary. It does not change
Kubernetes driver namespace selection, operator allowlist behavior, namespace
lifecycle, or the cluster-wide watch/RBAC currently required by multi-namespace
runtime modes. Any redesign that replaces cluster-wide watches or further
attenuates operator-mode ClusterRole permissions should remain a separate
runtime/RBAC change.
Alternatives Considered
- Install the gateway chart once per namespace: duplicates gateways,
credentials, database state, and lifecycle operations. - Use only conditionals in one chart: can alter a render but does not provide
an independently versioned tenant-onboarding artifact or clear GitOps
ownership boundary. - Use
managedmode for all tenants: lets the gateway create namespaces and
prerequisites dynamically, but conflicts with platforms where namespace
lifecycle and policy must remain operator-owned.
Current Upstream Findings
deploy/helm/openshellremains the only published chart.server.drivers.kubernetes.workspaceModenow supportsshared,managed,
andoperator; feat(k8s): add namespace-per-workspace support (RFC 0011 Phase 3) #2656 delivered namespace-per-workspace runtime support.- Shared mode renders a namespaced Role and RoleBinding. Managed/operator modes
use the current ClusterRole model for multi-namespace access. - The chart still owns the sandbox ServiceAccount and NetworkPolicy alongside
the gateway release. - RFC 0011 defines runtime namespace mapping, but not a separately published
workspace chart or its release/ownership contract.
Implementation
PR #2643 implements this packaging boundary and preserves the current runtime
authorization model.
Checklist
- I've reviewed current chart templates, RFC 0011, feat(k8s): add namespace-per-workspace support (RFC 0011 Phase 3) #2656, and related
Kubernetes runtime documentation. - This is a design proposal, not a "please build this" request.
Activity
dhirajsb commentedon Jul 27, 2026
dhirajsb commentedon Jul 27, 2026
I am happy to contribute the implementation for this feature rather than leaving it as a request for another contributor.
I have a working experimental implementation on my fork: https://github.com/dhirajsb/OpenShell/tree/codex/split-helm-charts
The spike adds an independently installable
openshell-workspacechart and a backward-compatible switch that lets the existing chart deploy the gateway without workspace-owned resources. It also updates chart tests, documentation, and OCI release packaging. The Helm lint and unit-test suites pass locally.If maintainers agree with the proposed chart boundary, naming, and compatibility approach, I can rebase the branch onto current
main, incorporate the requested direction, and submit the PR with this issue linked.dhirajsb commentedon Aug 4, 2026
@NVIDIA/openshell-codeowners, could you please help with triage on this proposal?
Does splitting the gateway-owned and workspace-namespace Helm resources sound useful for the supported Kubernetes deployment model? If so, would you be comfortable moving this through validation/acceptance and approving me to contribute the implementation as a PR?
I have an experimental, tested branch linked above. I am happy to adjust the chart boundary, naming, and compatibility approach first. If the Kubernetes Operator work in #1719 or another issue/PR already owns this packaging boundary, please point me to it so I can avoid duplicating work.
johntmyers commentedon Aug 28, 2026
@dhirajsb if you want to clean up the PR and move it to ready we can take a look
dhirajsb commentedon Aug 28, 2026
Thanks @johntmyers. I rebased #2643 onto current
main, resolved the chart drift, updated the documentation for the now-available operator workspace mode, added a cross-chart ownership render test, and marked the PR ready for review.Local validation passes:
mise run pre-commit, all current Helm lint variants, 111 gateway chart tests, 4 workspace chart tests, disjoint gateway/workspace object ownership, and OCI packaging for both charts.dhirajsb commentedon Oct 13, 2026
Validated #2643 against the packaging requirements. The default gateway render retains all 15 object identities. Gateway-only mode removes exactly the sandbox ServiceAccount, Role, RoleBinding, and NetworkPolicy; the workspace chart renders those four resources and supports a gateway ServiceAccount in another namespace.
Fresh validation passed all 123 Helm tests, lint, packaging, and the disjoint-ownership check. Both OCI charts are available at version 0.1.3. This satisfies the chart-split request; the existing multi-namespace runtime/RBAC model remains a separate concern.