Repository navigation
Conversation
Decision: the Kubernetes Development Branch scope in docs/design/scope.md, requested by the user on 2026-09-22, permits the isolated development backend. Accept the Kubernetes compute driver through a version-matched external OpenShell gateway while rejecting local managed gateway/service paths. Add a pinned, owned kind installer with enforcing CNI, Agent Sandbox, authenticated OpenShell, compatible OpenClaw image, and hosted inference. Keep credentials and deployment state outside Git. Regressions cover driver validation and managed-spec rejection, image UID and temporary-directory failures, and selecting the declared native agent when its name differs from the sandbox name. The behavioral failures were observed before the corresponding fixes. Validation: 629 workspace tests passed, 99 explicitly ignored; formatting, strict Clippy, schema freshness, two Kubernetes protocol fixtures, 36 local tooling tests, image checks, and documentation checks passed. The fresh kind lifecycle returned FOUR through NVIDIA hosted inference and completed export, unchanged reapply, and destroy in 66.99 seconds. A same-state apply then restored the demonstration. The validation record retains scope and upstream reliability limits.
Under the accepted Kubernetes Development Branch scope, configure three independent OpenClaw sandboxes sharing one inference profile. Preserve hosted NVIDIA connection settings and each sandbox's existing policy. Explain initial agent counts and distinguish schema validation from the historical single-agent live run. Validation: all 14 config_schema tests, full Fern documentation checks, independent configuration and documentation review, credential-pattern scan, and git diff --check passed. No live deployment was performed.
Under the accepted Kubernetes Development Branch scope, make existing-cluster deployment the normal guide and example path. Move kind setup into an optional test guide, remove the live test deployment-name restriction, and document platform prerequisites and shared Docker credential references. Exercise Docker and Kubernetes with the same bearer, mTLS, and hosted-provider credential tests, including missing references and in-place reference rotation. Preserve the existing schema and production credential resolver. Validation: workspace 629 passed and 99 opt-in tests ignored; focused auth and rotation checks, schema examples, formatting, strict Clippy, full Fern documentation checks, and independent review passed. No live cluster was accessed or changed.
Apply the accepted 2026-09-28 Kubernetes branch decision: one manifest selects an explicit existing cluster, generated development authentication, and owned Agent Sandbox installation when absent. Keep kind in the local test fixture and reuse inference credential.env references. Add strict schema validation, staged platform/provider resources, scoped mTLS connections, retained storage and credential identities, export, recovery, and ordered teardown. Preserve compatible existing prerequisites and fail closed on changed cluster, credential, chart, or release bindings. Embed pinned platform helpers in the verified bundle and document the three-agent example, custody rules, local setup, and qualification limits. Behavioral regressions failed before implementation for managed schema and resource compilation, empty computed IDs, incomplete-create recovery, helper lifetime, and same-UID Helm release changes. The final checks pass: 656 workspace tests, 40 backend and 37 fixture Python tests, four real pinned OpenTofu protocol tests, fmt, strict Clippy, Ruff, schema, and docs checks. Live Linux AMD64 kind tests passed three-agent apply/export/no-op/destroy and hosted FOUR. Final bundle 0.1.0-dev.374adc9b94fe8581 passed a fresh full SDK/CLI lifecycle with FOUR, unchanged export reapply, retained storage, and all ten existing prerequisite UIDs preserved. The owned test cluster was explicitly retired. No credentials, packages, or images were published. Mac ARM64 and other cluster platforms remain unqualified by this run.
Exercise the accepted 2026-09-28 managed Kubernetes branch decision with the complete three-agent sample and generated development authentication. The previous live helper rejected multiple sandboxes; observe the exact binding-selection regression fail before adding all-agent verification. Validate the complete owned binding set before opening one tunnel, retain the existing single-agent helper contract, and verify every agent response. Extend the lifecycle assertions to unchanged planning, matching export digest, stable root/platform resource IDs, and removal of every sandbox and provider binding. Update the test procedure and retain scoped results. The fresh Linux AMD64 kind run passed in 217.57 seconds. Assistant, researcher, and reviewer each returned FOUR from the hosted NVIDIA Ultra model. Destroy preserved the original Bound gateway PVC and all five credential Secret UIDs. Separate owned-cluster cleanup preserved all 15 preexisting kind node identities. No production backend change was needed. Validation: 657 workspace tests passed, 101 opt-in tests ignored; the explicit three-agent live test passed. Formatting, strict Clippy, schema, and documentation checks passed. Fern retained its existing authenticated redirects warning. Private inputs and credentials remain outside Git.
The accepted Kubernetes development branch decision permits an explicitly invoked owned kind fixture. Implement the requested single-command test with NVIDIA_INFERENCE_API_KEY as its only required configuration input. Detect native and Linux image architectures, select pinned Rust/protoc, build without the inference key, and execute the compiled test with that key. Use a fresh private manifest, cluster, and SDK state. Clean up only the proven owned cluster after success; retain failures with explicit inspection, cleanup, and inference-only retry commands. Stop child process groups on interruption. The initial runner test failed because the entry point did not exist; probe failure tests exposed the previous undifferentiated exit status. Add fixed, nonsecret inference diagnostics and label the affected sandbox. Validation: 658 workspace tests passed, 101 opt-in tests ignored; fmt and strict Clippy passed. 53 fixture and 40 managed-platform Python tests passed, as did the Node probe suite and schema/docs checks (one existing warning). The full Linux AMD64 kind runner passed: three hosted FOUR responses, plan/export/reapply/destroy, and guarded cleanup; lifecycle 234.08 seconds. All 20 preexisting kind nodes and the default kubeconfig were preserved. Independent code and documentation reviews passed. No credentials or private deployment inputs are included; Apple silicon still needs live qualification.
The accepted Kubernetes development fixture permits an explicit hosted-model request. Check the configured NVIDIA route before builds or cluster creation, and expose --check-inference for diagnosing the exported key without setup. Use verified TLS, refuse redirects, bound response size and total duration, and report only fixed diagnostics without credentials or upstream bodies. A retained inference retry does not update OpenShell's installed provider key. Correct the failure guidance and document fresh deployment after correcting a key, without claiming that a sandbox HTTP 401 proves the host key is wrong. Test-first: the check-only entry point failed argument parsing before the new mode existed. Authentication, redirect, timeout, redaction, and response tests then validated the helper. All 64 fixture Python tests pass. The workspace passed 658 tests with 101 ignored; fmt, strict Clippy, and docs/schema checks passed with the existing single documentation warning. The live host check passed without creating cluster resources; no new full lifecycle is claimed. Independent review passed; no credentials are included.
|
Auto-sync is disabled for draft pull requests in this repository. Workflows must be run manually. Contributors can view more details about this message here. |
Merge v1 02c2b6b into the Kubernetes development branch. The accepted Kubernetes Development Branch scope in docs/design/scope.md permits the existing-cluster SDK lifecycle; retain upstream Fabric configuration, discovery, and invocation ownership. Preserve discovery/apply/state refactors, managed platform bootstrap, retained storage, provider observations, and build input verification. Use installed Fabric adapter identifiers in examples and local fixtures, invoke agents through Fabric in opt-in tests, and attach the installed catalog when building the Kubernetes image. Regression tests first failed on local-engine discovery for managed Kubernetes, lost established storage during teardown, and obsolete fixture adapter identifiers. Correct those boundaries and preserve the upstream onboarding example's exhaustive driver display. Validation: 931 workspace tests passed, 123 opt-in tests ignored; six explicit real OpenTofu fixture tests passed; 65 fixture Python, 40 platform Python, and eight image build-plan tests passed. Rust formatting, strict Clippy, Python lint/format, schema, native Linux AMD64 bundle, and full Fern checks passed (existing warning). Independent reviews found no remaining consequential code or documentation issues. Credential-pattern scan found no candidates in changed branch files. Live kind, updated agent-image execution, and hosted inference were not rerun. Retain earlier live records as historical and document fresh bundle, image, and deployment-state requirements for retesting.
Follow the accepted Kubernetes Development Branch scope and the user's naming direction: keep generic deployment inputs independent of the local kind fixture. Rename the runner's state variable to cluster_state and the manual procedure's variable to NC_CLUSTER_STATE. Describe existing Kubernetes access in generic sample comments and record the naming rule. Keep actual kind commands, context prefixes, and retained fixture paths inside the local test workflow. Resource and harness kind schema fields keep their existing type-discriminator meaning. No runtime behavior or serialized state changes; no new behavioral test is needed for this rename. Validation: all 65 existing fixture Python tests passed; Ruff lint and format passed for the changed runner; workspace tests, strict Clippy, Rust formatting, schema, and Fern documentation checks passed (existing Fern warning). Independent naming and documentation review completed.
Windows CI failed because portable deployment and teardown tests called a Kubernetes fixture inside the Unix-only runtime test module. Move the unchanged fixture to the existing platform-independent deployment test module and update callers. Keep Unix-only tests gated and retain portable coverage on every native target. The accepted Kubernetes Development Branch scope preserves lifecycle and retention behavior across native SDK consumers; this is test-only source organization and does not change runtime behavior or deployment state. Validation: observed the Windows CI E0425/E0603 failures before the fix; 20 focused Kubernetes library tests, the full Linux workspace suite, strict workspace Clippy, formatting, and whitespace checks pass after it. Native Windows compilation awaits CI; it was not run on this Linux host.
The accepted Kubernetes Development Branch scope permits the explicitly requested owned kind qualification. Record a fresh Linux AMD64 run at 4df1efc after the v1/Fabric integration. The rebuilt bundle and image passed the full 238.76-second lifecycle: three real FOUR responses, unchanged plan, CLI export, stable-ID SDK reapply, CLI destroy, and owned-cluster deletion. Four isolated image contract tests also passed. All 20 preexisting node identities and the default kubeconfig remained unchanged; the intended workspace binding remained in destroyed SDK state. Keep credentials, generated private material, and raw evidence outside Git. API-key pattern scans found no candidates in 899 retained text files or the changed branch files. Publish only the non-secret validation summary, and replace obsolete current-runtime qualification statements in the guides while preserving historical records. Validation: full Fern/schema/link checks passed with the existing warning; whitespace and independent documentation review passed. This is a Linux AMD64 local result, not a broader platform or support claim.
Accepted scope: Kubernetes Development Branch in docs/design/scope.md, including source-pinned agent image builds. Archive timestamps and unchanged Cargo package versions allowed a shared target cache to reuse an older Fabric core with newer Python bindings. Keep download and completed-layer caching while rebuilding compiled artifacts for each source input. Add an isolated Docker regression that reproduces the missing API before the fix and passes afterward, and run it on both native image CI platforms. Validation: cache regression; eight image build-plan tests; full AMD64 Kubernetes image build and four image smoke tests; ARM64 Docker instruction checks; Rust formatting and strict Clippy; workspace 931 passed, 123 ignored; full documentation checks and independent review. No native ARM64 lifecycle run for this change.
Accepted scope: Kubernetes Development Branch in docs/design/scope.md and the user's explicit fresh AMD64 end-to-end test request. Record the full runner at d211c6f: three hosted FOUR responses, empty plan, CLI export, unchanged SDK reapply and resource identities, CLI destroy, and owned kind cleanup. Preserve the earlier revision's result and native ARM64 limit. Validation: lifecycle passed in 216.68 seconds; four image smoke tests; 20 preexisting node identities and default kubeconfig unchanged; no NVIDIA API key pattern in 3607 retained text files; full documentation checks and independent review passed. Code formatting, Clippy, and 931 workspace tests passed on the tested implementation in the preceding commit. Private credentials and raw evidence remain outside Git.
Follow the accepted Kubernetes Development Branch scope and the user’s 2026-09-30 OpenShift request with offline validation only. Merge v1 at 0e129ea and move operational cluster backends with the new provider boundary. Map authored OpenShift to the upstream Kubernetes driver, bind namespace UID/GID allocations, preserve mTLS and bearer authentication, and reject ownership or allocation drift before writes. Add three-agent examples, a namespace-UID-compatible image, and verified OCI metadata without a Docker dependency during cluster deployment. Update chart image values for the pinned OpenShell 0.1.2 contract. Negative tests first exposed missing API/allocation guards, stale chart image values, and Docker containerd image-ID assumptions. Fixed cases now pass. Validate with 1036 workspace tests, strict Clippy, formatting, 52 platform and 65 local fixture Python tests, 15 metadata tests, 9 image build-plan tests, real pinned chart renders, a native AMD64 image build, arbitrary UID/GID smoke, and actual metadata export/provider discovery. A verified bundle passed 3 cluster gateway protocol lifecycle fixtures and Kubernetes partial-create recovery through real OpenTofu. Generated schema and complete docs checks pass. No live OpenShift or cluster inference qualification is claimed; no credentials are included.
The existing live-test guard rejected the supported OpenShift profile before exercising either lifecycle or retained-state invocation. Share the cluster-family guard and document the unchanged test entry points. Permitted by the OpenShift profile extension in docs/design/scope.md, Kubernetes Development Branch. The regression first failed on OpenShift and now accepts both cluster profiles while rejecting Docker and Podman. Validation: cargo fmt --check, strict workspace Clippy, and the full workspace suite (1,037 passed; 141 ignored). Documentation validation passed with its existing Fern warning. Independent review passed. No live OpenShift resources or inference endpoints were accessed.
The accepted Kubernetes Development Branch scope permits integration with v1 1149b73. Resolve the runtime catalog and stdin contract changes while preserving the Kubernetes and OpenShift implementation. This normal merge preserves published history under the repository rule against force pushes. The final tree is identical to the tested rebase plus its validation record. Workspace, offline image/protocol, and explicit hosted inference checks pass. Full live apply remains blocked by unsupported native Fabric health; retain the readiness contract. Post-failure export, destroy, and owned-cluster cleanup passed. See docs/validation/kubernetes-v1-rebase-linux-amd64.md.
The accepted Kubernetes Development Branch scope and requested normal merge preserve published PR history. Record exact tree equivalence between signed merge 0c51071 and the tested rebase with its validation summary. Executable source and dependencies are unchanged. Validation: documentation/schema checks and git diff --check passed; independent documentation review passed. The full lifecycle native-health blocker and separate successful inference and cleanup results remain unchanged.
The user's October 2 request and accepted Kubernetes Development Branch scope permit a local test exception for unsupported native Fabric health. Keep normal SDK/CLI apply strict. Select a separate ignored lifecycle test only with --allow-unsupported-fabric-health and require fresh exact unsupported observations, settled matching intent, and owned bindings before continuing. Preserve real replies, no-op plans, export/reapply identities, and destroy. Require an explicit completion marker before cleanup and label the result development-only with health unverified. The new tests first failed before implementation; focused Rust and 68 Python fixture checks pass. Workspace tests, strict Clippy, Rust/Python formatting, documentation/schema checks, and independent code/documentation review pass. Live validation follows on this exact candidate. No credentials or private state included.
Record the fresh AMD64 kind run under the accepted Kubernetes Development Branch scope and explicit unsupported-Fabric-health development exception. Preserve the normal SDK apply failures and unverified native health boundary. Validation: development E2E passed, 1048 Rust tests and 68 Python fixture tests passed; documentation checks and independent documentation review passed.
Resolve the conflict in .github/workflows/rust.yml by taking v1's cargo ci steps. Move this branch's managed Kubernetes Python tests into the Python scripts job in CI / Dependencies, which also runs on pushes that change them, and update docs/testing.md to say where they run.
## Summary Five changes, one commit each, following the review of #12392's failures and of how much Python NemoClaw ships: 1. **Onboarding test:** each example journey is now its own test, so Windows CI no longer runs into the 300 s limit. 2. **pip:** agent images no longer carry pip (−16 MB each). 3. **Node.js:** only OpenClaw, Hermes and Pi include Node.js (−135 MB for the other seven). 4. **Ollama proxy:** rewritten in Rust on an empty base image, 215 MB → 3.65 MB. 5. **Guard and image tooling:** a test fails on any new Python or shell file, and `cargo images` replaces the three host Python scripts in `CI / Images`. ## Commits ### 1. `test(onboarding): run each example journey as its own test` - One test walked all 30 single-sandbox examples in sequence; Windows took 210–240 s, close to nextest's 300 s limit. - A macro now generates one test per example, so they run in parallel with separate limits. - A guard test fails if an example with one sandbox has no test. - Linux ARM64: 98 s → 24 s; the slowest example takes 16 s. ### 2. `build(images): leave pip out of the Fabric environment` - Both venvs are created `--without-pip`; uv already installs everything at build time. - Hermes's editable install now uses uv, mounted only for that step. - The image test's `requires-python` check used pip's vendored `packaging`; it now uses a small parser that rejects any clause it doesn't understand. ### 3. `build(images): add Node.js only to harnesses that run JavaScript` - Node.js was copied into every image from the shared base stage. - Only OpenClaw's CLI, Hermes's TUI and the TypeScript Pi adapter use it. The other adapters have no Node.js references, and Claude's and Codex's bundled CLIs are native binaries. - An image test checks which images carry `node`. | Image (uncompressed, ARM64) | Before | After | |---|---|---| | claude | 653 MB | 501 MB | | deepagents | 452 MB | 300 MB | | pi | 641 MB | 625 MB | | hermes | 1039 MB | 1023 MB | | openclaw | 3214 MB | 3198 MB | ### 4. `feat(images): rewrite the Ollama proxy in Rust on an empty base` - **New crate:** `nemoclaw-ollama-proxy`. It keeps the Python proxy's contract: the same specification, `/data` key rules (existing volumes keep their key), loopback and inventory checks, routes, status codes, limits and streaming, and it never forwards its credential. - **Image:** built statically against musl and `FROM scratch`; 215 MB → 3.65 MB. The SDK starts the binary directly. - **Live SDK test fix:** `docker_provider_proxy` failed at `v1` with the old Python image too, because plans now read sandbox image metadata from the gateway engine. It now uses the shared image-engine fixture, and changes the key's mode through Docker's archive API because the image has no shell. ### 5. `build: guard against new scripts and build images with cargo images` - **Guard:** `tests/scripts.rs` lists every Python and shell file with its reason: inside an agent image (21), vLLM recipe code (9), or host tooling still to move to Rust (17). It fails on unlisted or stale entries. - **`cargo images build|qualify`** replaces `build_fabric.py` and `qualify_contract.py`, using the same Docker commands and labels. It builds without the SDK, so `CI / Images` needs no protoc. - **Bake plan tests:** moved from `test_builds.py` to a Rust test that skips without Docker Buildx. - **AGENTS.md** gains one rule: write tooling and tests in Rust; Python belongs only inside images whose workload runs on it. ## Validation (Linux ARM64) - **`cargo ci`:** passes every step on the final commit: 1042 tests, then 90 lifecycle tests. - **Images:** claude, deepagents, pi, hermes and openclaw built from this branch pass the image tests, the command contract, and the OpenClaw, Hermes and Pi native checks. - **`cargo images`:** produced bridge and catalog labels byte-identical to the Python builder's for the dummy and OpenClaw images. - **Proxy:** its 13 tests pass, also inside the image's test stage; the live SDK proxy lifecycle passes against the Rust image. - **Static checks:** lint, unit and reference image tests, Dockerfile checks and the docs check pass. - **Not run locally:** AMD64, macOS and Windows; this PR's CI covers them. ## Follow-ups - **#12392** will fail the new guard: it adds 31 Python files, including SDK code that runs on users' machines. It needs a decision before it merges. - The 17 `PendingRust` entries are next: test fakes, the SSH capacity collector, the Brev scripts, and the docs publishing script.
|
Hi @gaveezy, thanks for this work. The Kubernetes and OpenShift profiles are something we want on Since this PR was opened, Here is what we plan to do differently, and why. 1. Rust instead of Python on the user's machine
In this branch, the SDK writes Python scripts to disk and runs them with the user's Before flowchart LR
SDK["NemoClaw SDK"] -->|writes and runs| Py["platform.py, auth.py,<br/>tunnel.py (user's python3)"]
Py --> Kubectl["kubectl"]
Py --> Helm["helm"]
Py --> OpenSSL["openssl"]
Kubectl --> API["Kubernetes API"]
Helm --> API
After flowchart LR
SDK["NemoClaw SDK<br/>(kube library)"] --> API["Kubernetes API"]
SDK -->|chart install and uninstall only| Helm["helm"]
Helm --> API
What this changes for users:
2. The SDK is the only way to install the gatewayThis branch has two ways to install OpenShell on a cluster: the SDK's managed path, and a separate kind installer in Before flowchart LR
Kind["tools/kubernetes/stack.py"] -->|installs chart and prerequisites| Cluster["kind cluster"]
E2E["tools/kubernetes/e2e.py"] --> Kind
E2E -->|external gateway| SDK["nemoclaw apply"]
SDK --> Cluster
After flowchart LR
Test["cargo ci live-kind"] -->|creates an empty cluster| Cluster["kind cluster"]
Test --> SDK["nemoclaw apply<br/>(managed gateway)"]
SDK -->|installs chart and prerequisites| Cluster
The external-gateway path for clusters where a platform team runs OpenShell stays as it is. 3. A simpler development token issuerOpenShell checks operator tokens against a signing key it fetches over HTTPS from the token issuer, so the development profile still needs a small server in the cluster. Today that server is a Python program in a Python image. We plan to replace it with an ordinary static file server, still over HTTPS, that serves two fixed JSON files the SDK writes into a ConfigMap. The SDK still creates the signing key and the token itself, so none of our own code runs in the cluster. Before flowchart LR
SDK["SDK"] -->|auth.py with openssl| Keys["keys and token"]
SDK -->|deploys| Pod["python image running<br/>oidc_server.py"]
Gateway["OpenShell gateway"] -->|fetches signing key| Pod
After flowchart LR
SDK["SDK (Rust)"] --> Keys["keys and token"]
SDK -->|writes 2 JSON files| Map["ConfigMap"]
Map --> Pod["static file server"]
Gateway["OpenShell gateway"] -->|fetches signing key| Pod
4. The kind test stops where
|
Adds the deployment YAML and planning for sandboxes on a Kubernetes cluster, ported from #12392 onto current v1. - Config: runtime.provider accepts kubernetes and openshift, and gateway.kubernetes names the kubeconfig, context, namespace, prerequisite policy and development authentication. A managed Kubernetes gateway needs an HTTPS 127.0.0.1 endpoint and excludes the local engine settings; OpenShift sandboxes need the OpenShift profile. The schema and configuration reference are regenerated. - Image metadata: Kubernetes has no local engine to inspect, so image.metadata names a local OCI metadata bundle. The SDK verifies its digest chain against image.ref before reading the Fabric catalog and reads no layers. Destroy doesn't need it. - Compile: a managed Kubernetes gateway compiles into kubernetes_storage and kubernetes_gateway resources from one specification, and the gateway's generated credentials reach the OpenShell provider through fixed environment names. OpenShift uses OpenShell's kubernetes driver. - Managed local specs reject Kubernetes targets and drivers, so a cluster target cannot reach the Docker or Podman installers. The provider does not yet act on the two new resource kinds; cluster operations come in the next commits. Compared with #12392, test changes: its test that read the maintained OpenShift examples was dropped, since the shared example test checks every example, and comments calling teardown-only documents "legacy" now describe the destroy behaviour. Validation: 384 focused SDK, provider and build tests pass, including the branch's config, OpenShift, compile and image metadata tests and the schema check. clippy is clean. Co-authored-by: Hai Nguyen <[email protected]>
The provider now acts on kubernetes_storage and kubernetes_gateway, calling the SDK operations from the previous commits. The earlier branch ran its Python helper here. - Backend: each row's encoded specification names the kubeconfig and context; operations keep their receipt in the directory passed through NEMOCLAW_KUBERNETES_STATE and run helm from PATH. A changed specification is refused at plan time rather than updated in place. Storage is never removed and never reads as absent once recorded; the gateway is removed only by destroy. - Provider configuration: platform_only configures the provider without gateway connection settings, so the runtime stage can plan and apply the platform resources before gateway credentials exist. During destroy, retained storage keeps its observed running value instead of being reinstalled. Both changes come from #12392. - Examples: the Kubernetes and OpenShift examples from #12392, which the shared example test now parses, round-trips and schema-checks. - kubernetes::server() returns the API server URL for the authored context, so the provider needs no kube dependency of its own. Validation: five backend unit tests (planned versus recorded identity, incomplete observations, a changed specification, a row of the other kind, removal rules) and #12392's provider planning, refresh and schema tests. All 1,115 deterministic workspace tests pass; clippy is clean across the workspace. Co-authored-by: Hai Nguyen <[email protected]>
OpenShell authenticates users with OIDC tokens. For a development gateway the SDK is its own issuer. #12392 did this with openssl and an RSA key; this uses Rust libraries already in the workspace. - Material: an ECDSA P-256 CA and an issuer certificate for <name>-oidc.<namespace>.svc.cluster.local, and an Ed25519 signing key, kept in <state>/auth/ readable only by the owner. They are created once and reused; a partial set, as after an interrupted write, is refused rather than replaced. The signing key is written last, so its presence marks a complete set. - Documents: the OIDC discovery document and a one-key set (OKP, Ed25519, EdDSA). OpenShell v0.1.2 accepts Ed25519 keys. - Tokens: one-hour EdDSA tokens with the deployment's UID as audience, the development admin role, and every OpenShell scope. rcgen (already used by the e2e tests) and ring (already linked through rustls) are now SDK dependencies. The issuer runs in the cluster in the next commit. Validation: five tests check that material is created once, kept private and reused; that a partial set is refused; that the discovery document and key set name the issuer; that a token verifies with the published key and carries the deployment's claims; and that rustls trusts the issuer certificate for the issuer host only. All deterministic workspace tests pass; cargo deny licenses and sources pass; clippy is clean. Co-authored-by: Hai Nguyen <[email protected]>
The gateway verifies development tokens against a key set it fetches over HTTPS. #12392 ran a Python server in the cluster for this; here a pinned static server publishes two files and nothing else. - Issuer: nginxinc/nginx-unprivileged@sha256:5aea7c... (1.29.3, multi-arch), pinned in versions.json. It runs non-root with a read-only root filesystem, no capabilities, no service account token, and the image's entrypoint scripts skipped. It serves the discovery document and key set from a ConfigMap and returns 404 for anything else. The private signing key stays on the operator's machine. - Network: a NetworkPolicy admits only the gateway's pods on 8443 and allows no egress. - Lifecycle: the issuer's six objects belong to the gateway. Ensure creates or verifies them before installing the release; remove deletes them after the release is gone. They are recorded by UID in the receipt, like every other owned object. - Gateway: the chart's server.oidc values name the issuer, use the deployment's UID as audience, map the development roles and scopes, and mount the issuer CA through caConfigMapName. Validation: the operation tests check the issuer objects exist after ensure, the published key set has no private part, the policy has no egress, and remove deletes the issuer but keeps storage. A new live-docker test runs the pinned image read-only with the generated configuration and fetches both documents over HTTPS with the issuer CA; it passes locally. Real helm 3.22.0 renders the chart with these values and mounts the CA through SSL_CERT_FILE. All deterministic workspace tests pass; clippy is clean. Co-authored-by: Hai Nguyen <[email protected]>
…orward The gateway isn't exposed outside the cluster, so each command needs a temporary connection to it. #12392 ran kubectl port-forward under a Python supervisor; this forwards through the Kubernetes API in the SDK process. - Operations::connect() requires the gateway to be running, then listens on the authored loopback port and forwards each connection to the gateway pod's gRPC port through kube's port-forward stream. An occupied port is refused, so a different process can't stand in for the gateway. Dropping the connection stops the forward. - Credentials: the client CA, certificate and key from the chart's <name>-client-tls Secret are written to <state>/client/, readable only by the owner, and a fresh development token is signed. The connection exposes them as the four NEMOCLAW_MANAGED_K8S_* values the provider's credential references name. - The gateway's own certificate includes 127.0.0.1, so TLS to the forwarded port verifies without host overrides. Validation: four tests. The forwarder carries bytes both ways for successive connections to a local echo server; a connection writes private client files under the state directory and supplies a token for the deployment; an occupied port is refused; and a gateway that isn't ready can't be connected. The port forward to a real pod is exercised by the kind lifecycle later in this series. All deterministic workspace tests pass; clippy is clean. Co-authored-by: Hai Nguyen <[email protected]>
…ration Plan, apply, export and destroy now open the managed Kubernetes gateway's connection before talking to it, and close it afterwards. The deployment changes come from #12392; kubernetes::connection() now builds on the Rust operations instead of the Python helper. - Deployment::connected() opens the connection for a document whose gateway is a managed Kubernetes target. The connection's four credential values are passed only to that operation's provider processes, and the guard keeps the port forward open until the operation ends. - Every provider process gets NEMOCLAW_KUBERNETES_STATE, the deployment's kubernetes state directory. - Provider processes never inherit NEMOCLAW_MANAGED_K8S_* or NEMOCLAW_KUBERNETES_STATE from the caller's environment; only the operation sets them. - The runtime stage refuses a gateway without its storage binding, and reports the gateway running only when it already was. Destroy keeps storage and skips agent teardown when the platform never came up. - connection() resolves the kubeconfig through the deployment's secrets and honours cancellation while connecting. Validation: #12392's deployment, runtime and teardown tests, updated for spec.gateway.runtime.provider. All 1,132 deterministic workspace tests pass; clippy is clean. A real gateway is exercised by the kind lifecycle later in this series. Co-authored-by: Hai Nguyen <[email protected]>
OpenShell's Kubernetes driver runs every sandbox as 10001:10001 unless told otherwise, while our agent images ran as 1000:1000. #12392 built separate openclaw-kubernetes and openclaw-openshift images that re-owned the image for 10001. Docker and Podman instead run the image's own user, so moving the images to 10001 lets one image serve all three. - image/fabric/Dockerfile: the node user and /sandbox are 10001:10001 in the agent base and the dummy reference image. - image/fabric/runtime.json: the default process policy runs as 10001:10001. - The command contract runner's /sandbox tmpfs, the v1 hosted parity documents, the examples with an explicit process policy, and the tests that name the user all use 10001. The recorded v0 exports keep 1000; the parity test's projection maps v0's user to v1's. No separate Kubernetes images are added. OpenShift assigns a UID per namespace and is handled with the OpenShift profile. Existing local Docker volumes written by a 1000:1000 image would keep that owner; v1 is unreleased, so there is no migration. Validation: the image test now asserts 10001 and failed on the previous Pi image. The image check stages (lint, unit and reference tests) pass; a rebuilt Pi image passes the image test, the command contract and Pi's native check; cargo ci live-docker passes all ten tests, including the gateway tests that run real sandboxes. All deterministic workspace tests pass; clippy is clean. Co-authored-by: Hai Nguyen <[email protected]>
A Kubernetes or OpenShift sandbox must name a metadata bundle in image.metadata, since no local engine can be inspected there. The SDK could read one, but nothing wrote it; #12392 used a 263-line Python script. cargo images export-metadata IMAGE --platform P --output PATH saves the image from the local Docker engine and writes the bundle to a new file. The bundle holds the image's index, the manifest for the platform and that manifest's configuration, each as its exact bytes, and nothing else: no layers or attestation manifests. Every blob is checked against its digest while it is read. docs/build.md describes when and how to run it. Validation: three tests build an OCI archive shaped like docker image save's output (an outer index, the image index, one manifest and an attestation): the bundle holds only index, manifest and config with their exact bytes; a missing platform is refused; and the SDK verifies an exported bundle for the image's digest. Exported from the real UID 10001 Pi image, the bundle is 20 KB and the SDK accepts it for the image's digest and refuses another digest. All deterministic workspace tests pass; clippy is clean with and without the sdk feature. Co-authored-by: Hai Nguyen <[email protected]>
On OpenShift, OpenShell runs a sandbox and its workspace setup as the UID the namespace assigns, not 10001. Setup copies the image's /sandbox to the workspace volume, but /sandbox was 0700 and owned by 10001, so another UID could not read it: running the Pi image as 1000680000 gave "Permission denied". /sandbox and /sandbox/tmp are now 0755, still owned by 10001. The copy on the workspace volume stays private, since OpenShell creates each directory it copies as 0700. One image keeps serving every runtime, rather than adding an OpenShift image per harness as #12392 did; the images are to move to the Fabric project. On Docker and Podman the sandbox uses /sandbox directly, so other users in the container can now list it; a sandbox runs only the agent and root. Validation: a new image test walks /sandbox and requires every entry to be readable, and directories searchable, by another UID. It failed on the previous Pi image and passes on the rebuilt one. Run as UID 1000680000, the rebuilt image can list /sandbox but not write to it. Co-authored-by: Hai Nguyen <[email protected]>
The cluster examples named openclaw-kubernetes and openclaw-openshift images, build targets from #12392 that this branch does not have: the same agent image now serves every runtime. They now name the regular openclaw image and say how to write its metadata bundle with cargo images export-metadata. The OpenShift example no longer says its profile is only tested offline, since cargo ci live-kind now runs it; a real OpenShift cluster has still not admitted these pods. Validation: the example tests (56) and all deterministic workspace tests pass. Co-authored-by: Hai Nguyen <[email protected]>
## Summary NemoClaw can now run agent sandboxes on an existing Kubernetes or OpenShift cluster, through a gateway NemoClaw installs or one the operator already runs. This replaces #12392: [the plan and its reasoning](#12392 (comment)) are on that PR, and Hai Nguyen's work there is credited with `Co-authored-by` trailers. Apply stops at the agent health check on every runtime, because the pinned Fabric reports health as unsupported (#12443). On a cluster it stops there after the gateway and every sandbox are running. ## What users get | | Managed gateway | Existing gateway | |---|---|---| | Select with | `gateway.management: managed` and `gateway.kubernetes` | `gateway.management: external` | | NemoClaw creates | A namespace, a credential key, a development token issuer, the OpenShell chart release | Nothing outside the sandboxes | | Authentication | Development profile only, not for production (#12692) | The gateway's own | | Reached through | A port forward that lasts for each command | Its endpoint | `gateway.runtime.provider` chooses `kubernetes` or `openshift`. See [the guide](https://github.com/NVIDIA/NemoClaw/blob/feat/kubernetes-profiles/docs/kubernetes.md) and the examples in `examples/kubernetes/` and `examples/openshift/`. Things to know: - **Prerequisites stay with the operator:** Agent Sandbox and exactly one default StorageClass. NemoClaw installs nothing cluster-wide and uses only the authored kubeconfig and context. - **Nothing extra on the user's machine:** the bundle carries the Helm provider and pins the chart by digest, so there's no Helm CLI, `kubectl`, Python or `openssl`. - **One image for every runtime:** agents run as UID/GID 10001, the Kubernetes driver's default, and any UID can read the workspace seed. A cluster sandbox names a metadata bundle in `image.metadata`; `cargo images export-metadata` writes it. - **OpenShift:** the gateway and sandboxes run as the first UID and group of the namespace's assigned range. If the range doesn't appear within 30 seconds, apply stops before installing the gateway. - **Destroy:** removes the sandboxes, the release and the issuer, and keeps the namespace, the credential key and the persistent volumes. ## How it fits together ```mermaid flowchart LR S["CLI or SDK"] --> T["OpenTofu"] T --> N["NemoClaw provider:<br/>namespace, key, issuer, readiness"] T --> H["Bundled Helm provider"] H --> G["OpenShell gateway release"] S -- "port forward per command" --> G G --> X["Sandboxes, via Agent Sandbox"] ``` [Managed Kubernetes ownership](https://github.com/NVIDIA/NemoClaw/blob/feat/kubernetes-profiles/docs/design/architecture.md#managed-kubernetes-ownership) lists who owns each resource. The issuer's private key stays out of Helm values and OpenTofu state. The pinned Helm provider can forget a release when a lookup fails during removal. Destroy saves a private checkpoint first, so a retried destroy restores only that binding and continues from a fresh, checked plan ([recovery](https://github.com/NVIDIA/NemoClaw/blob/feat/kubernetes-profiles/docs/usage.md#recover-an-interrupted-helm-removal)). ## Changes outside Kubernetes These affect every runtime: - **Agent images** run as UID 10001 instead of 1000, ship `/sandbox/tmp`, and keep `/sandbox` readable by other UIDs. Existing images need rebuilding. Nothing migrates data that a UID 1000 agent wrote to a retained volume, and no doc mentions it yet. - **The Fabric build cache** keeps compiled artifacts with their source. - **The OpenClaw image** copies upstream's `/app` as root, so the agent can read its plugins but not change them. - **The managed gateway's schema** states its local defaults again, which onboarding reads. ## Tests `cargo ci live-kind` runs on a temporary kind cluster (Kubernetes 1.37, Agent Sandbox 0.5.0, Linux ARM64 and AMD64): - **Gateway:** installs, authenticates, refuses a forged token, is removed and reinstalled, and keeps its storage. - **Agent sandbox on Kubernetes:** a full deployment through the SDK stops only at the health check, exports, and destroys keeping storage. - **Agent sandbox on OpenShift:** the test writes the namespace's UID range itself, as OpenShift would. The gateway and the sandbox both run as its first UID. - **Chart:** two renders of the pinned chart with the SDK's values. The deterministic suite covers ownership, recovery checkpoints, the gateway values, the OpenShift identity, the port forward and the metadata bundle. In the lifecycle step, five recovery tests run the bundled OpenTofu and Helm provider against a local fake Kubernetes API. ## Not covered - **OpenShift admission:** kind doesn't enforce OpenShift's security constraints, so no real OpenShift cluster has admitted these pods (#12641). - **Agent behaviour:** no test sends inference or reaches a healthy agent; #12443 blocks that. - **Network policy:** enforcement on a cluster is untested. - **Managed model services:** `spec.services` is rejected with a cluster gateway (#12641). ## Status This merges `v1` at `606ea2970c` (#12579). That merge needed one schema fix, described in its commit. `Test / windows_amd64` fails in `runtime_export_declares_the_native_helm_provider_inputs`: OpenTofu's error is withheld because some environment value looks like a short credential. It passes on Linux and macOS, and the cause isn't known yet. --------- Co-authored-by: Hai Nguyen <[email protected]>
One v1 deployment YAML can provision a managed development OpenShell gateway and multiple agents on an explicitly selected Kubernetes or OpenShift cluster, or connect to an externally managed gateway. The existing NemoClaw CLI delegates to the SDK and OpenTofu provider for lifecycle operations.
Draft: an explicit development E2E mode now passes the Kubernetes lifecycle with real responses from all three agents while reporting Fabric health as unverified. Normal CLI/SDK apply still rejects unsupported native Fabric health. OpenShift remains validated offline only.
Implementation
runtime.provider: kubernetesandruntime.provider: openshift, strict schema validation, and three-agent examples. Managed OpenShift selectsgateway.kubernetes.distribution: openshiftand uses OpenShell's upstream Kubernetes driver.credential.envmechanism as Docker/Podman; credentials stay outside YAML, exports, and Git.e2e.py --allow-unsupported-fabric-healthfor development testing. A separate test permits only fresh, matching unsupported-health failures after completed provisioning; all other failures still stop and retain resources. Normal CLI/SDK behavior and the deployment schema are unchanged.The accepted Kubernetes Development Branch decision in
docs/design/scope.mdpermits these changes. OpenShell owns sandbox execution and supervisors; this PR adds no NemoClaw controller or OpenShell fork.v1 integration and validation
Merged v1
1149b73a3aedad40fb46ba3d8d30a96d2757ff59through signed normal merge0c510713c84e92e2fa19030919476b9e2dc2ca3c, preserving the existing PR history. The cluster backends retain upstream's stdin configuration/invocation contract. The subsequent development-test implementation was tested at77b3c0e6f2e4f20bede0d2d7c10d28519ec8db4b.FOURfrom all three agents, checked unchanged plan, CLI export, stable identities through reapply, CLI destroy, and owned-cluster cleanup.fabric_health_unsupported. The explicit test mode independently verified fresh exact observations, completed provisioning, and matching retained bindings before continuing. It reportedPASS (development)and health unverified; it did not turn either SDK call into a successful normal apply.The new result is recorded in
docs/validation/kubernetes-development-health-linux-amd64.md. The earlier strict-test failure, image checks, real-OpenTofu fixtures, and offline OpenShift checks retain their scope indocs/validation/kubernetes-v1-rebase-linux-amd64.md. Native health qualification still requires supported Fabric health and a fresh run without the development option.Review entry points
Boundaries
Managed authentication is development-only; existing production identity providers use the external-gateway path. The cluster owner supplies networking, storage, capacity, registry access, and runtime prerequisites. SDK destroy retains namespace, persistent storage, credential material, development issuer, prerequisites, and the OpenShell workspace; disposable cluster deletion belongs to the explicit local fixture.
No live OpenShift cluster/version, SCC admission, storage, runtime isolation, CNI enforcement, or hosted inference is qualified. Historical ARM64 results retain their recorded revision scope. No API key or private deployment material is included; no image was published.