Skip to content

feat: configure managed gateways in OpenShell's gatewayConfig format - #13492

Merged
cv merged 1 commit into
v1from
feat/gateway-config
Oct 19, 2026
Merged

cv merged 1 commit into
v1from
feat/gateway-config

Conversation

@cv

@cv cv commented Oct 19, 2026

Copy link
Copy Markdown
Collaborator

Failure

NemoClaw wrote a managed Docker or Podman gateway's gateway.toml as formatted text and spliced sandboxDriverConfig into it by searching for the driver's table header. Every OpenShell setting a user needed required its own NemoClaw field, type, validation, and docs. On Kubernetes, the same setting went through the chart's deprecated server.drivers.kubernetes alias. Part of #13473.

Decision

OpenShell already defines the format. Its Helm chart takes non-secret gateway configuration through one gatewayConfig value: each key names a TOML table and holds its fields, nested maps are inline tables, and a list of maps is an array of tables (migration guide).

  • spec.gateway.config replaces sandboxDriverConfig and uses that format on every managed runtime.
  • Docker and Podman: NemoClaw builds gateway.toml as TOML values and merges the authored tables in, instead of formatting text. This needs toml's display feature, which adds toml_writer from the same project.
  • Kubernetes and OpenShift: the tables go to the chart's gatewayConfig, where they can override NemoClaw's workspace_mode and workspace storage-size defaults. The deprecated alias is no longer used.
  • Validation: plan rejects a setting that replaces a key NemoClaw owns, whether written as a dotted table or a nested map. It also rejects malformed tables, and a table written both ways, as the chart does. OpenShell validates everything else; it rejects unknown fields in the selected driver's table and ignores other drivers' tables.
  • External gateways: take no config.

No backward compatibility: the rendered file differs from earlier bytes, so existing Docker and Podman deployments need a fresh deployment UID, as before for any change to the file. The follow-up for #13473 writes the file whenever the gateway container is created, so a configuration change replaces the container instead.

Validation

  • New tests (managed_gateway_config, and kubernetes_managed_compile::authored_tables_reach_the_chart_gateway_config / chart_keys_nemoclaw_owns_are_rejected) failed before the change.
  • What they cover:
    • authored tables, inline tables, and arrays of tables on Docker and Podman;
    • owned keys rejected in both forms;
    • a table defined twice, and malformed tables;
    • external gateways rejected;
    • the chart merge with overridable defaults.
  • Regenerated: the JSON Schema, the configuration reference, and the provider schema fixture.
  • Checks:

Replace sandboxDriverConfig with spec.gateway.config, which takes OpenShell gateway settings in the OpenShell Helm chart's gatewayConfig format. Docker and Podman gateways render it into gateway.toml beside the keys NemoClaw owns, built as TOML values instead of formatted text. Kubernetes and OpenShift pass it to the chart's gatewayConfig instead of the deprecated server.drivers alias. Plan rejects settings that replace owned keys; OpenShell validates the rest (#13473).
@cv
cv enabled auto-merge (squash) October 19, 2026 18:11
@github-actions

Copy link
Copy Markdown
Contributor

@cv
cv merged commit 151aae2 into v1 Oct 19, 2026
@cv
cv deleted the feat/gateway-config branch October 19, 2026 18:31
cv added a commit that referenced this pull request Oct 19, 2026
…#13497)

## Failure

Managed Docker and Podman gateways kept `gateway.toml` in retained
storage, written once when the deployment was created. Storage compared
it on every refresh, so any change to `spec.gateway.config` from #13492
failed with "gateway storage configuration differs" and needed a fresh
deployment UID. Completes #13473.

## Decision

The file now belongs to the gateway container, and storage holds only
data and credentials.

- **Docker:** the launch data source renders the file, and
`docker_container` uploads it when it creates the gateway container. The
Docker provider replaces a container when its uploads change.
- **Podman:** the provider writes the file into the gateway container
before each start. The Podman gateway resource keeps `gateway_config` as
an attribute, so a change replaces it.
- **Storage** no longer writes or compares the file, and loses the
`gateway_config` attribute, so a configuration change never replaces
storage. Podman observation stops comparing the file too.
- **Docs:** a configuration change replaces the gateway container and
keeps its data. The restarted gateway restarts its sandboxes, where
Fabric agents don't start again, so the next plan replaces them through
#13493.

## Validation

- **Tests:**
  - the compile test checks the upload;
- a new data-source test checks the rendered file and rejection of keys
NemoClaw owns;
- the Podman mutation test checks that the file is written before each
start;
  - the storage tests check that storage never reads it;
  - the lifecycle contract and readiness fixtures follow the new owner.
- **Checks:** `cargo ci` (including the bundle and lifecycle steps),
`cargo ci live-docker` (11 tests), and `cargo ci live-kind` (7 tests)
passed after rebasing onto #13493.
- **Live, on a DGX Spark with a managed Docker gateway and a Deep Agents
sandbox:**
- changing `openshell.gateway.log_level` planned only `delete → create`
of the gateway container;
- the new container's file had the new level, and the gateway's data was
kept;
- the sandbox then exited, and the next plan replaced it with its
reason;
- after apply the sandbox was `Ready` and the following plan was empty;
  - the deployment was destroyed and its objects removed.
- **Not run live:** the Podman path.

After merge, close #13473 by hand.
cv added a commit that referenced this pull request Oct 19, 2026
…fig (#13501)

## Failure

With `gateway.kubernetes.authentication.profile: oidc`, NemoClaw took
OpenShell's OIDC settings as its own fields (`issuer`, `audience`,
`rolesClaim`, `adminRole`, `userRole`, `scopesClaim`) and copied them
into the chart's `openshell.gateway.oidc` table. It also added
`jwks_ttl_secs` and `dangerously_allow_insecure_http`. Each new
OpenShell OIDC setting needed a NemoClaw field. NemoClaw's docs also
misdescribed OpenShell's behavior: omitting both roles applies
OpenShell's default roles, not "any valid token" (#13495).

## Decision

- **Where the settings live:** the `oidc` profile takes
`openshell.gateway.oidc` from `spec.gateway.config` (#13492), in
OpenShell's names, exactly as OpenShell's [gateway authentication
guide](https://github.com/NVIDIA/OpenShell/blob/5a7728c304b5528e954e9ae900cf21f84e1a12b1/docs/how-it-works/gateways/authentication.mdx#oidc)
documents for Helm. The table reaches the chart as written.
- **What NemoClaw keeps:** `profile`, the `token` reference it uses to
reach the gateway, and `caConfigMap`, a chart value rather than gateway
configuration.
- **Validation:**
  - plan requires the table, in either the dotted or the nested form;
- under `development` it still rejects the table, since NemoClaw writes
it for its own issuer;
- NemoClaw no longer checks the issuer URL's shape or the pairing of
roles; OpenShell validates its table.
- **Values NemoClaw added:** dropping them changes nothing, because
OpenShell's defaults for `jwks_ttl_secs` (3600) and
`dangerously_allow_insecure_http` (false) are the same.
- No backward compatibility.

## Validation

- **Tests:**
-
`an_oidc_profile_takes_openshells_oidc_table_and_development_takes_none`
covers the dotted and nested tables, the removed fields, and the
required and owned table.
- `an_existing_oidc_issuer_replaces_the_development_issuer` checks that
the table reaches the chart as written and that the provider row holds
only `token` and `caConfigMap`.
  - #13484's connect and operations tests use the new shape.
- **Checks:**
- `cargo ci` passed, including the bundle and lifecycle steps, after
rebasing onto #13484;
- `cargo ci live-kind` passed (7 tests), including
`kubernetes_live::oidc`, which authenticates with an existing issuer's
token through the new table and refuses another audience.

After merge, close #13495 by hand.
cv added a commit that referenced this pull request Oct 19, 2026
…13502)

## Failure

`docs/design/scope.md` still listed "Managed gateways write OpenShell's
configuration file field by field (#13473)" as an exception awaiting a
decision. #13473 is closed: #13492 and #13497 decided it.

## Decision

Record the outcome with the managed-gateway decision: NemoClaw writes
only the keys it owns and passes the rest through from
`spec.gateway.config` in OpenShell's format. That leaves
`runtimes/qwen38` (#13472) as the only exception awaiting a decision.

## Validation

`fern check` and `git diff --check` passed. Docs only.
@wscurran wscurran added area: sandbox OpenShell sandbox lifecycle, runtime, config, or recovery area: security Security controls, permissions, secrets, or hardening feature PR adds or expands user-visible functionality platform: container Affects Docker, containerd, Podman, or images platform: k8s Affects Kubernetes deployments labels Oct 23, 2026
@wscurran wscurran added the v1 NemoClaw v1 branch label Oct 28, 2026
cv pushed a commit that referenced this pull request Oct 28, 2026
#13854)

## Failure

`docs/sandbox-network.md` said NemoClaw doesn't expose OpenShell's
upstream proxy settings for managed gateways, a line older than
`spec.gateway.config` (#13492). OpenShell's Docker, Podman and
Kubernetes drivers take the proxy in their own tables, which
`spec.gateway.config` already reaches. The docs also didn't say what a
managed gateway can't take: files on the gateway, and chart values
outside `gatewayConfig` (#13835).

## Decision

```mermaid
flowchart LR
    Config["spec.gateway.config"] --> Local["Docker or Podman:<br/>gateway configuration file"]
    Config --> Chart["Kubernetes or OpenShift:<br/>chart gatewayConfig"]
    Local --> Proxy["https_proxy, no_proxy,<br/>proxy_connect_by_hostname"]
    Chart --> Proxy
    Chart --> Secret["proxy_auth_secret_name<br/>(Secret in the namespace)"]
    Files["proxy_auth_file, proxy_ca_bundle,<br/>chart resources"] -.-> Limits["limits.md"]
```

- **`sandbox-network.md`** shows the proxy in `spec.gateway.config` for
Docker, and for Kubernetes with a credential Secret created in the
deployment's namespace, as for registry Secrets. It links OpenShell's
per-driver reference at the pinned `bdb956f`. It also says that a change
restarts the gateway and replaces Fabric sandboxes, and that no managed
gateway has run behind a proxy.
- **`limits.md`**, with #13835:
  - proxy credential files on Docker and Podman gateways;
- a proxy CA on any managed gateway, since the chart mounts it only from
`upstreamProxy.caBundle.configMapName`;
  - the Kubernetes gateway's fixed CPU and memory.
- **`security.md`**'s corporate CA table names `proxy_ca_bundle`.
- No NemoClaw field or chart-values passthrough is added; that would
need a decision first.

## Validation

- `helm template` of the pinned chart (digest `e88977ce`, OpenShell
v0.1.5) with the Kubernetes example's settings in `gatewayConfig`
renders them into the gateway's `[openshell.drivers.kubernetes]` table,
beside `namespace` set to the release namespace. Chart 0.1.5 treats its
older `upstreamProxy.url` values as aliases for these keys.
- `proxy_*` keys aren't among the keys NemoClaw manages in
`managed/gateway_config.rs`, so plan passes them through.
- `cargo run --locked -p nemoclaw-build -- docs --check` passes. It
caught a deliberately broken anchor in the new limits row.
- `fern check` didn't run locally, because this host has no Node.js; CI
runs it.
- Not run: a managed gateway behind a proxy.

For #13835; PRs into `v1` don't close issues, so it needs closing by
hand after merge. Part of #13837.
@cv cv added this to the Roadmap: GTC DC 2026 milestone Nov 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: sandbox OpenShell sandbox lifecycle, runtime, config, or recovery area: security Security controls, permissions, secrets, or hardening feature PR adds or expands user-visible functionality platform: container Affects Docker, containerd, Podman, or images platform: k8s Affects Kubernetes deployments v1 NemoClaw v1 branch

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants