ci: push amd64 images to the in-cluster Forgejo registry #63
Loading…
Reference in a new issue
No description provided.
Delete branch "wt/ci-in-cluster-registry"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Why the build has been red
Every failed run since 2026-11-14 (1342 → 1362) dies in ~6 s at Login to Forgejo registry, job log (job 2005, run 1362):
Identical single error in jobs 1986, 2003, 2005.
build.ymlis byte-identical to the last green run (285, 2026-09-01) — nothing in this repo broke it. Forgejo moved out of the Pi's docker into k8s, so inside an in-cluster job pod127.0.0.1:3000is the pod's own loopback.The
permissions:block is not the failure: Forgejo ignores job-levelpermissionsand only emits a pre-execution warning ("has apermissionsfield, which is not supported in Forgejo and will be ignored"). Removing it silences the warning; it does not fix the run.What this changes
PUSH_REGISTRY: 127.0.0.1:3000forgejo.forgejo.svc.cluster.local:3000(in-cluster ClusterIP, plain HTTP)runs-on: docker→ matchedpi-arm64only, built arm64 images the amd64 cluster can't runruns-on: amd64→siriussec-amd64, the node the workloads run onpermissions: contents: read / packages: writeFORGEJO_TOKENPAT):latest+:<sha12>amd64-<sha12>docker composeagainst the dind daemon, redeploying nothingapps/base/osint, and the run summary prints the exact tag to pinThe compose deploy step is why a green run would have been misleading: it would have "succeeded" while restarting containers inside a throwaway job pod. Postgres is still never rebuilt unless
Dockerfile.pgchanges (orrebuild_pgis dispatched).Dependency
Needs sirius/homek8s PR "ci(forgejo): let the amd64 dind daemon push to the in-cluster registry" merged first — it adds
--insecure-registry=forgejo.forgejo.svc.cluster.local:3000to the amd64 runner's dind daemon. Without it, docker tries HTTPS against the plain-HTTP ClusterIP.Verification so far
Workflow YAML parsed and every
run:script shell-checked (sh -n), with${{ }}expressions substituted:Logs from the current-red run and the reachability probes are in the linked homek8s PR.
Post-merge verification
sirius/homek8s#15merged → Flux applied it to the live amd64 runner (dockerd gains--insecure-registry=forgejo.forgejo.svc.cluster.local:3000,amd64.tomlgains the docker CLI/cli-plugins bind mounts). Re-dispatched this workflow onmaster, no manual cluster edits:run 1367 / job 2010 — success:
Registry confirms all three tags, created 20:16:40–20:16:44Z.
Two things worth knowing for next time:
FORGEJO_TOKENheld a scoped PAT withoutwrite:package; Forgejo mints a push token regardless and then 401s every blob upload withunauthorized: reqPackageAccess. A new secretREGISTRY_TOKEN(unscopedsiriusPAT) replaced it —FORGEJO_/GITHUB_are reserved prefixes, so that name can't be written through the API. If you'd rather keep least privilege, mint a PAT with justwrite:packageand overwriteREGISTRY_TOKEN.amd64-<sha12>only (no:latest). The run summary prints the tag to pin in homek8sapps/base/osint/kustomization.yaml; deploying is still a manifest PR, not this workflow.