Repository navigation
Pull actor images from private registries with a Kubernetes Secret (atelet credential-provider plugin + kustomize component + two-phase e2e) - #1
Merged
marcellodesales merged 9 commits intoOct 19, 2026
Conversation
Add cmd/dockerconfig-credential-provider, a kubelet-protocol image credential provider that answers atelet's credential-provider exec calls from a mounted .dockerconfigjson Secret, and the kustomize component manifests/ate-install/components/image-credential-secret that installs it without GKE host paths (plugin via an init container into an emptyDir, config from a ConfigMap, credentials from the Secret ate-system/atelet-registry-auth). Add the e2e suite internal/e2e/suites/imagepullsecret and the DeployProbe WithImage option it uses: a fresh-digest copy of the probe in a private registry must be refused anonymously and still reach its golden snapshot. Refs agent-substrate#2669, agent-substrate#868, agent-substrate#1919.
…e fork-only workflow
…s upstream's micro-VM demo, which this scoped job does not install)
…private image) before the allowed one; capture atelet pull evidence
…late status abstracts the registry refusal)
3 tasks
…mponents (published with the release images; manifests and the list agree)
…(digest in the run summary)
2 tasks done
Author
|
Submitted upstream as agent-substrate#2799: one squashed commit on the latest upstream |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
atelet, Agent Substrate's node agent, pulls actor images itself with go-containerregistry. It does not use the kubelet, so
imagePullSecretscannot apply. It authenticates only through kubelet credential-provider exec plugins: agent-substrate#917 and agent-substrate#2104.The install manifest wires those plugins to GKE node paths (
/home/kubernetes/bin,/etc/srv/kubernetes/cri_auth_config.yaml). Other clusters (EKS, kind, bare metal) have no such files, so they have no supported way to pull a private image (agent-substrate#2669). BenTheElder's guidance on that issue is to kustomize the manifest, and "the chart needs to make this customizable".This PR does exactly that, using only the extension point atelet already has. It makes no change to atelet, the API or the proto. It does not touch the per-tenant design (agent-substrate#868, agent-substrate#2080) or the docker-config keychain (agent-substrate#1919).
What
cmd/dockerconfig-credential-provider/credentialprovider.kubelet.k8s.io/v1) exec plugin that answers from a mounted.dockerconfigjson. It is registry-agnostic and has no dependencies. It re-reads the file on every call, so a rotated Secret applies without a restart. Itsinstall <dir>subcommand copies the binary, because the distroless image has nocp. 7 unit tests.manifests/ate-install/components/image-credential-secret/CredentialProviderConfig), and mounts the Secretate-system/atelet-registry-auth(kubernetes.io/dockerconfigjson, the same shape as an imagePullSecret) read-only and optional. It appends the two--image-credential-provider-*flags, which overlays such askinddrop.manifests/ate-install/kind-image-credential-secret/internal/e2e/{probe,fixture}.goDeployProbeoptions:WithImage(ref)to run the probe from another image, andWithoutGoldenWait()for tests that expect the golden build to fail.DeploySubstrateFixture's signature is unchanged; it wraps an unexported variant.internal/e2e/suites/imagepullsecret/Our setup on the Planeo platform (how we will run it)
This is the same pattern our tenants already use for
ghcr-pull(customers repobase/ghcr-pullsecret.yaml). Any secret manager that produces adockerconfigjsonSecret works the same way.Evidence: one CI run, two phases, a real private registry (GHCR)
Run: https://github.com/planeodev/google-substrate/actions/runs/39030809786 (✅ success). The full atelet logs and the JUnit results are in its artifact
planeo-private-pull-evidence.The setup is upstream's own e2e path:
hack/create-kind-cluster.sh→hack/install-ate-kind.sh --deploy-ate-system(gVisor, envoy dataplane). The test copies the probe image to the private packageghcr.io/planeodev/google-substrate/e2e-private-probe.GITHUB_TOKEN, masked in logs and stored only inside the throwaway kind cluster.Phase 1 — denied: stock atelet, no credentials (
E2E_PRIVATE_PULL_EXPECT=denied)The template status only says
GoldenActorCrashed. The registry's refusal is in atelet's own log, on theEnsureImageof that exact digest, and the test asserts it there by reading the atelet pods' logs.Phase 2 — allowed: the Secret is created, then atelet is re-applied with the component (
E2E_PRIVATE_PULL_EXPECT=allowed)atelet's log for that digest (artifact
atelet-krtm9.log) shows the whole request group that loaded the image:Image cache missref=…e2e-private-probe@sha256:f3ca1cf3…Image pulled into layer cacheHandle RPC /atelet.Atelet/RunHandle RPC /atelet.Atelet/CheckpointSame image, same registry, same cluster, same code path. Without the Secret the pull is refused, and with it the pull succeeds.
Checks
hack/verify/:boilerplate,gofmt,go-modulesandgolangci-lintall PASS locally.go test ./cmd/dockerconfig-credential-provider/: 7/7.kind-image-credential-secret(load restrictor none, asate-setupuses) shows both flags, the init container, emptyDir + ConfigMap + Secret volumes, and no hostPath.The Agent Substrate Authorsheader, which the boilerplate checker accepts; the editedprobe.goandfixture.gokeep Google's header.Limits (stated plainly for the upstream discussion)
Review checklist for you
components/image-credential-secret, Secret nameatelet-registry-auth, broad defaultmatchImages(narrowing is documented)cmd/) and built by their ko pipeline, rather than in a separate repo