Skip to content

feat(sdk): pull images from private registries on Docker - #13412

Merged
cv merged 4 commits into
v1from
feat/registry-auth
Oct 18, 2026
Merged

cv merged 4 commits into
v1from
feat/registry-auth

Conversation

@cv

@cv cv commented Oct 18, 2026

Copy link
Copy Markdown
Collaborator

Closes #12709 together with #13390, which covered Kubernetes and OpenShift.

Failure

NemoClaw pulled every image through the Docker provider anonymously. The SDK never wrote the provider's registry_auth, so managed gateway and service images on Docker couldn't come from a private registry.

Decision

  • spec.registries: lists registry addresses. Every generated Docker provider gets a matching registry_auth, and the provider reads the login of the machine running OpenTofu from its Docker configuration file. The configuration, graph and state hold only addresses.
  • configFile: optional per registry. The bundled provider reads .docker/config.json in the OS user's home directory and doesn't honor DOCKER_CONFIG; the live test confirmed this. Setting configFile passes another file to the provider's config_file.
  • Who pulls each image: documented in usage.md. Agent images on Docker and Podman are pulled by OpenShell's driver with the engine host's own login, so NemoClaw adds nothing there. Kubernetes and OpenShift use feat(kubernetes): reference existing image pull Secrets #13390's pull Secrets.
  • The registry fixture: shared with feat(kubernetes): reference existing image pull Secrets #13390's Kubernetes test (pinned image, fixture credentials, htpasswd, Docker helper).

Validation

  • A new live Docker test, docker_registry, runs a registry that requires a login, pushes an image with a login in a temporary Docker config, and applies the SDK-generated provider block with the bundled OpenTofu and Docker provider. It checks that:
    • without registry_auth, the pull is refused;
    • with it, the image pulls;
    • neither state nor OpenTofu's output holds the password or its encoded form.
  • cargo ci passes locally (1554 unit tests and 153 lifecycle tests), and so does cargo ci live-docker, including the new test.

cv added 3 commits October 18, 2026 02:31
spec.registries lists registry addresses; every generated Docker provider
gets a matching registry_auth and reads the login of the machine running
OpenTofu from its Docker configuration file, optionally a configFile. A live
test pulls from a registry that requires a login, without credentials in
state.
@cv
cv enabled auto-merge (squash) October 18, 2026 09:56
@github-actions

Copy link
Copy Markdown
Contributor

cv added a commit that referenced this pull request Oct 18, 2026
## Failure

On #13412, all 27 `nemoclaw-build` `changes::` tests failed in CI with
`git rev-parse HEAD: fatal: not a git repository`.

Since #13407, these tests copy a fixture repository built once under
Cargo's `CARGO_TARGET_TMPDIR`, reusing it whenever its `.git` directory
exists. CI caches `target/`, which includes that directory. The failures
fit a restored cache that kept `.git` but not the files inside it. The
template then passed the check, but its copies weren't Git repositories.
#13407's own CI had no cached template, so it passed.

## Decision

A template is reused only if:

- a completion marker, written inside `.git` after the base commit,
exists; and
- `git rev-parse --verify HEAD` succeeds in it.

Otherwise it's removed and rebuilt. The marker lives inside `.git`, so
copies don't see it as an untracked file. This adds one Git call per
test, while still avoiding a Cargo and Git build of the fixture per
test.

## Validation

- A new test, `an_incomplete_template_is_not_reused`, checks that a
template whose `.git` contains only the marker and an empty `objects`
directory isn't reused.
- All 27 `changes::` tests pass locally.
- `cargo ci` passes locally: 1,554 unit tests and 153 lifecycle tests.
@cv
cv merged commit 57aa895 into v1 Oct 18, 2026
@cv
cv deleted the feat/registry-auth branch October 18, 2026 10:50
@wscurran wscurran added area: packaging Packages, images, registries, installers, or distribution area: security Security controls, permissions, secrets, or hardening feature PR adds or expands user-visible functionality platform: container Affects Docker, containerd, Podman, or images labels Oct 23, 2026
cv pushed a commit that referenced this pull request Oct 27, 2026
)

## Failure

Reviewing #13080's follow-ups (#13837) turned up docs that no longer
match v1: references to the Qwen recipe #13506 removed, an incomplete
list of cluster rights, links to closed issues as open work, an
HTTPS-only claim #13063 relaxed, and a skills example the schema
rejects.

## Decision

```mermaid
flowchart LR
    R["recipes.md: inline Qwen example and adapter"] --> R2["Removed (#13506)"]
    K["kubernetes.md: cluster rights"] --> K2["Add ServiceAccounts, Roles,<br/>RoleBindings, pods/portforward"]
    K3["kubernetes.md: #12709 open"] --> K4["Link Pull from Private Registries"]
    U["usage.md: Podman removal not covered"] --> U2["Link the Podman removal steps"]
    U3["usage.md: credentials require HTTPS"] --> U4["Prefer HTTPS, as inference.md says"]
    A["agents.md: harness under agent"] --> A2["harness, with kind, on the sandbox"]
```

- The rights are what the pinned chart creates with NemoClaw's values
(`serviceAccount.create` and `rbac.create` default on) and the
port-forward the SDK opens to the gateway pod.
- #12709 closed after #13412 added Docker registry logins; #12640's
Podman removal steps are in `usage.md`.

## Validation

- The `agents.md` example, merged into `examples/fabric-openclaw.yaml`,
validates against the schema; the old one fails with "'harness' was
unexpected".
- `cargo run --locked -p nemoclaw-build -- docs --check` passes; `git
diff --check` is clean.

Part of #13837.

Co-authored-by: Claude Opus 5.5 <[email protected]>
@wscurran wscurran added the v1 NemoClaw v1 branch label Oct 28, 2026
@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: packaging Packages, images, registries, installers, or distribution area: security Security controls, permissions, secrets, or hardening feature PR adds or expands user-visible functionality platform: container Affects Docker, containerd, Podman, or images v1 NemoClaw v1 branch

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants