ci(forgejo): let the amd64 runner reach the in-cluster registry and use docker #15

Merged
sirius merged 2 commits from wt/forgejo-insecure-registry into master 2026-11-17 20:14:52 +00:00
Owner

Why

Forgejo's container registry now lives in the cluster, reachable in-cluster only as the plain-HTTP ClusterIP forgejo.forgejo.svc.cluster.local:3000. Docker treats only 127.0.0.0/8 as insecure, and the amd64 job container ships no docker CLI at all. Both break sirius/osint-dashboard's build workflow (merged as #63), which was red from 2026-11-14 for exactly these reasons.

Change (2 files)

  1. apps/base/forgejo/runner-amd64.yaml — one dockerd flag:
               rm -f /var/run/docker.pid /var/run/docker.sock
+              dockerd --host=unix:///var/run/docker.sock --tls=false --mtu=1420 \
+                --insecure-registry=forgejo.forgejo.svc.cluster.local:3000 &
  1. apps/base/forgejo/runner-configmap.yaml — amd64.toml gets the same CLI injection arm64.toml already has. Without it the job dies with docker: command not found on its first docker login:
-      docker_host: "unix:///var/run/docker.sock"
+      options: -v /usr/local/bin/docker:/usr/bin/docker:ro -v /usr/local/libexec/docker/cli-plugins:/usr/local/lib/docker/cli-plugins:ro -v /var/run/docker.sock:/var/run/docker.sock

docker_host is dropped, not kept alongside options — having both mounts the socket twice ("Duplicate mount point"). No --memory cap, unlike arm64: this runner also carries the existing amd64 release builds, which were already uncapped.

Only the amd64 runner is touched: amd64 is the label the osint build uses (the cluster is amd64, and its images must match), and the arm64/deploy runners never build them.

Rebased onto #14

The first revision conflicted with #14 (stale dind pid), which landed in master after this branch opened. Rebased; the resolved dockerd block keeps #14's rm -f /var/run/docker.pid /var/run/docker.sock and adds the registry flag. mergeable: true as of a385a8a.

Evidence — the pipeline actually works

Both files were applied to the live cluster with Flux suspended (apps kustomization), the osint workflow was dispatched on its branch, and the runner was then handed back to Flux (which reverted the cluster to master — verified: amdb64.toml back to docker_host, dockerd back to no flag).

Run 1365, job 2008, runs_on: [amd64] → success:

Image tag: amd64-88b95f6a95a1
Login Succeeded
#14 naming to forgejo.forgejo.svc.cluster.local:3000/sirius/osint-dashboard:amd64-88b95f6a95a1 done
3a67171a1dfb: Pushed
... 86c2e305aac3: Pushed
amd64-88b95f6a95a1: digest: sha256:783bc91881690ec7d8424476dd489f8941228f632ad85be9c6372cf7ff42f114 size: 2829

Registry confirms the artifact (created 2026-11-17T20:11:14Z):

$ curl -s .../api/v1/packages/sirius?type=container&q=osint-dashboard
osint-dashboard amd64-88b95f6a95a1 container 2026-11-17T20:11:14Z

Manifests rendered + shell-checked after the rebase:

yaml docs: 2 | sh -n rc: 0
dockerd --host=unix:///var/run/docker.sock --tls=false --mtu=1420 \
  --insecure-registry=forgejo.forgejo.svc.cluster.local:3000 &

This must merge for CI to stay green. Flux has reverted the live runner to master, so until it lands the osint build fails at docker login again (HTTPS against the plain-HTTP ClusterIP).

## Why Forgejo's container registry now lives in the cluster, reachable in-cluster only as the plain-HTTP ClusterIP `forgejo.forgejo.svc.cluster.local:3000`. Docker treats only `127.0.0.0/8` as insecure, and the amd64 job container ships no docker CLI at all. Both break `sirius/osint-dashboard`'s build workflow (merged as #63), which was red from 2026-11-14 for exactly these reasons. ## Change (2 files) 1. **`apps/base/forgejo/runner-amd64.yaml`** — one dockerd flag: ```diff rm -f /var/run/docker.pid /var/run/docker.sock + dockerd --host=unix:///var/run/docker.sock --tls=false --mtu=1420 \ + --insecure-registry=forgejo.forgejo.svc.cluster.local:3000 & ``` 2. **`apps/base/forgejo/runner-configmap.yaml`** — `amd64.toml` gets the same CLI injection `arm64.toml` already has. Without it the job dies with `docker: command not found` on its first `docker login`: ```diff - docker_host: "unix:///var/run/docker.sock" + options: -v /usr/local/bin/docker:/usr/bin/docker:ro -v /usr/local/libexec/docker/cli-plugins:/usr/local/lib/docker/cli-plugins:ro -v /var/run/docker.sock:/var/run/docker.sock ``` `docker_host` is dropped, not kept alongside `options` — having both mounts the socket twice ("Duplicate mount point"). No `--memory` cap, unlike arm64: this runner also carries the existing amd64 release builds, which were already uncapped. Only the amd64 runner is touched: `amd64` is the label the osint build uses (the cluster is amd64, and its images must match), and the arm64/deploy runners never build them. ## Rebased onto #14 The first revision conflicted with #14 (stale dind pid), which landed in master after this branch opened. Rebased; the resolved `dockerd` block keeps #14's `rm -f /var/run/docker.pid /var/run/docker.sock` **and** adds the registry flag. `mergeable: true` as of a385a8a. ## Evidence — the pipeline actually works Both files were applied to the live cluster with Flux suspended (`apps` kustomization), the osint workflow was dispatched on its branch, and the runner was then handed back to Flux (which reverted the cluster to master — verified: `amdb64.toml` back to `docker_host`, dockerd back to no flag). Run **1365**, job 2008, `runs_on: [amd64]` → **success**: ``` Image tag: amd64-88b95f6a95a1 Login Succeeded #14 naming to forgejo.forgejo.svc.cluster.local:3000/sirius/osint-dashboard:amd64-88b95f6a95a1 done 3a67171a1dfb: Pushed ... 86c2e305aac3: Pushed amd64-88b95f6a95a1: digest: sha256:783bc91881690ec7d8424476dd489f8941228f632ad85be9c6372cf7ff42f114 size: 2829 ``` Registry confirms the artifact (created 2026-11-17T20:11:14Z): ``` $ curl -s .../api/v1/packages/sirius?type=container&q=osint-dashboard osint-dashboard amd64-88b95f6a95a1 container 2026-11-17T20:11:14Z ``` Manifests rendered + shell-checked after the rebase: ``` yaml docs: 2 | sh -n rc: 0 dockerd --host=unix:///var/run/docker.sock --tls=false --mtu=1420 \ --insecure-registry=forgejo.forgejo.svc.cluster.local:3000 & ``` **This must merge for CI to stay green.** Flux has reverted the live runner to master, so until it lands the osint build fails at `docker login` again (HTTPS against the plain-HTTP ClusterIP).
Forgejo's container registry now lives in the cluster and is reachable only
as the plain-HTTP ClusterIP forgejo.forgejo.svc.cluster.local:3000. Docker
treats only 127.0.0.0/8 as insecure, so any workflow logging in to or pushing
to that host would fail with "server gave HTTP response to HTTPS client".

Adds --insecure-registry for that host to the amd64 dind daemon, which is the
runner the osint-dashboard build now targets (amd64 matches the cluster, so
images are usable on the nodes).
Dispatch of the rewired osint build (run 1363) reached the new login step and
died with '/var/run/act/workflow/3: line 9: docker: command not found'.

amd64.toml only set docker_host, which injects the socket bind but not a CLI,
and the job image is node:20-bullseye (no docker). arm64.toml already solves
this by bind-mounting the dind sidecar's own /usr/local/bin/docker and
cli-plugins into the job container; do the same here and drop docker_host so
the socket is not mounted twice.

No --memory cap: this runner also carries the existing amd64 release builds,
which were already uncapped.
sirius force-pushed wt/forgejo-insecure-registry from 1473f45fc6 to a385a8a360 2026-11-17 20:14:15 +00:00 Compare
sirius merged commit 39654781a7 into master 2026-11-17 20:14:52 +00:00
sirius changed title from ci(forgejo): let the amd64 dind daemon push to the in-cluster registry to ci(forgejo): let the amd64 runner reach the in-cluster registry and use docker 2026-11-17 20:15:36 +00:00
Author
Owner

Post-merge verification (no manual apply)

Flux reconciled apps to master@3965478 and rolled the dind container. Live state:

$ kubectl -n forgejo get deploy forgejo-runner-amd64 -o jsonpath='{...containers[0].command[2]}'
rm -f /var/run/docker.pid /var/run/docker.sock          # #14, preserved
  --insecure-registry=forgejo.forgejo.svc.cluster.local:3000 &   # this PR

$ kubectl -n forgejo get cm forgejo-runner-config -o jsonpath='{.data.amd64\.toml}' | tail -5
  options: -v /usr/local/bin/docker:/usr/bin/docker:ro -v /usr/local/libexec/docker/cli-plugins:/usr/local/lib/docker/cli-plugins:ro -v /var/run/docker.sock:/var/run/docker.sock
  force_pull: true

Then the osint workflow was dispatched on master (run 1367, job 2010, runs_on: [amd64]) → success, all three images built and pushed:

plan app=1 scraper=1 summarizer=1 pg=0
Image tag: amd64-5ea43a3d0ba3
Login Succeeded
#14 naming to .../osint-dashboard:amd64-5ea43a3d0ba3      digest: sha256:783bc918...
#15 naming to .../osint-news-scraper:amd64-5ea43a3d0ba3  digest: sha256:009871b4...
#12 naming to .../osint-news-summarizer:amd64-5ea43a3d0ba3 digest: sha256:11adfe96...
🏁  Job succeeded

Registry (package list, container type):

osint-dashboard        amd64-5ea43a3d0ba3  2026-11-17T20:16:40Z
osint-news-scraper     amd64-5ea43a3d0ba3  2026-11-17T20:16:42Z
osint-news-summarizer  amd64-5ea43a3d0ba3  2026-11-17T20:16:44Z
### Post-merge verification (no manual apply) Flux reconciled `apps` to master@3965478 and rolled the dind container. Live state: ``` $ kubectl -n forgejo get deploy forgejo-runner-amd64 -o jsonpath='{...containers[0].command[2]}' rm -f /var/run/docker.pid /var/run/docker.sock # #14, preserved --insecure-registry=forgejo.forgejo.svc.cluster.local:3000 & # this PR $ kubectl -n forgejo get cm forgejo-runner-config -o jsonpath='{.data.amd64\.toml}' | tail -5 options: -v /usr/local/bin/docker:/usr/bin/docker:ro -v /usr/local/libexec/docker/cli-plugins:/usr/local/lib/docker/cli-plugins:ro -v /var/run/docker.sock:/var/run/docker.sock force_pull: true ``` Then the osint workflow was dispatched on `master` (run **1367**, job 2010, `runs_on: [amd64]`) → **success**, all three images built and pushed: ``` plan app=1 scraper=1 summarizer=1 pg=0 Image tag: amd64-5ea43a3d0ba3 Login Succeeded #14 naming to .../osint-dashboard:amd64-5ea43a3d0ba3 digest: sha256:783bc918... #15 naming to .../osint-news-scraper:amd64-5ea43a3d0ba3 digest: sha256:009871b4... #12 naming to .../osint-news-summarizer:amd64-5ea43a3d0ba3 digest: sha256:11adfe96... 🏁 Job succeeded ``` Registry (package list, container type): ``` osint-dashboard amd64-5ea43a3d0ba3 2026-11-17T20:16:40Z osint-news-scraper amd64-5ea43a3d0ba3 2026-11-17T20:16:42Z osint-news-summarizer amd64-5ea43a3d0ba3 2026-11-17T20:16:44Z ```
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
sirius/homek8s!15
No description provided.