Skip to content

ate-setup: widen digest-lookup auth and pass through pinned tags - #1391

Merged
Haven Xia (HavenXia) merged 1 commit into
agent-substrate:mainfrom
annapendleton:prebuilt-digest-auth
Sep 2, 2026
Merged

ate-setup: widen digest-lookup auth and pass through pinned tags#1391
Haven Xia (HavenXia) merged 1 commit into
agent-substrate:mainfrom
annapendleton:prebuilt-digest-auth

Conversation

@annapendleton

Copy link
Copy Markdown
Collaborator

Two follow-ups to the pre-built image install.

Digest lookups authenticated with the docker config file alone. Someone
installing a published release onto GKE, whose Artifact Registry credentials are
gcloud's rather than a credential helper wired into ~/.docker/config.json, got
a working build from source and a 401 from --image-repo. The lookup keychain is
now authn.NewMultiKeychain(authn.DefaultKeychain, google.Keychain), the same
relative order ko uses. DefaultKeychain stays first, so ~/.docker/config.json
still wins wherever it has an entry, and google.Keychain returns Anonymous
immediately for any non-Google registry, so this is a no-op for Docker Hub, ghcr,
ECR, ACR and the Kind local registry. ECR and ACR would need credential-helper
modules this repository does not depend on, so those still need a docker login;
the doc comment no longer claims the lookup authenticates the way ko does.

Separately, pin appended the looked-up digest unconditionally, so
--image-tag v1@sha256:... produced <repo>/<image>:v1@sha256:...@sha256:...,
which no registry can parse. A tag that already carries a digest now passes
through as written.

No dependency change: pkg/v1/google was already vendored, and atelet already
uses the same package for its image pulls.

Verified against Artifact Registry with DOCKER_CONFIG pointed at an empty
directory, which reproduces the affected setup — without this change the lookup
fails with DENIED: Unauthenticated request, with it the tag resolves. Also
installed on a Kind cluster from a local registry, where all five control-plane
images came up pinned to the digests the registry published.

  • Tests pass
  • Appropriate changes to documentation are included in the PR

Pinning a pre-built image to its digest authenticated the lookup with the
docker config file alone. ko resolves its own credentials through a
multi-keychain, and the GCP half of it is what the flag's own audience needs:
someone installing a published release onto GKE, whose Artifact Registry
credentials are gcloud's rather than a helper wired into ~/.docker/config.json,
got a working build from source and a 401 from --image-repo. Add GCP to the
keychain. ECR and ACR need credential-helper modules this repository does not
depend on, so those registries still need a docker login, and the doc comment
no longer claims the lookup authenticates the way ko does.

Pass a tag that already carries a digest through as written. The reference was
built as <repo>/<image>:<tag> and then had the looked-up digest appended
unconditionally, so --image-tag v1@sha256:... produced
<repo>/<image>:v1@sha256:...@sha256:..., which no registry can parse. That
input resolved before the tags were pinned.

Document both in commands.md, which described the digest lookup as needing read
access to the repository but never said how it authenticates.
Comment thread cmd/ate-setup/internal/images/prebuilt_test.go
@HavenXia
Haven Xia (HavenXia) merged commit ae99b66 into agent-substrate:main Sep 2, 2026
9 checks passed
Anna Pendleton (annapendleton) pushed a commit that referenced this pull request Sep 2, 2026
…1400)

With --image-repo the image tag becomes the substrate version, which
names the atelet DaemonSet and the node label. A tag written with its
digest, v1@sha256:..., is a valid image reference but not a valid label
value, so the install failed at the atelet step unless VERSION was also
set. The version is now the tag alone; the digest still pins the image.

Followup for #1391


- [ ] Tests pass
- [ ] Appropriate changes to documentation are included in the PR
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants