#7 - Add REGISTRY_INSECURE to push to an in-cluster registry over plain HTTP #8
No reviewers
Labels
No labels
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
actions/kaniko!8
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "7-add-insecure-registry-option"
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?
What
Adds a
REGISTRY_INSECUREsetting tobuild.sh(defaultfalse). When set totrue, the wrapper passes Kaniko's--insecure-registry=${REGISTRY_HOST}, so a pipeline can push to Forgejo's in-cluster Service over plain HTTP instead of through the public ingress.Why
See #7. The runners and Forgejo run on the same node, but pushes to
git.van-hemmen.comgo out through Traefik and back. Traefik's ~60 s per-request timeout cuts large layer uploads, andactions/sindri'scoder-xfce-vncbuilds fail at the push withPATCH …/blobs/uploads/…: 502 Bad Gateway. Forgejo logsunexpected EOFon uploads lasting 60.0–60.7 s.Changes
build.shREGISTRY_INSECUREsetting:true/TRUE/True/1/yesenables it;false/0/no/empty leaves it off. It's checked right after the defaults are set, so an invalid value stops the job before any build work.--insecure-registry=${REGISTRY_HOST}is added to the Kaniko call. That flag covers only the named registry, so pulls from Docker Hub and other registries keep using TLS.REGISTRY_INSECUREis shown in the settings summary printed before the build.false, the Kaniko command is byte-for-byte the same as today.README.md: new row in the settings table, plus a "Pushing to an in-cluster registry" section with example settings. It notes thatREGISTRY_HOSTmust match the destination host (port included), that pulls staygit.van-hemmen.com/…, and that Forgejo's login request still goes to its public URL.Verification
actions/kaniko:26.7.0supports--insecure-registry("Insecure registry using plain HTTP to push and pull"), checked with/kaniko/executor --helpin a pod.build.shin that image's/busybox/sh, with theexec /kaniko/executorline replaced byecho:… --dockerfile=./Dockerfile --no-push(unchanged)REGISTRY_INSECURE=falsetrue+REGISTRY_HOST=app-http-service.forgejo.svc.cluster.local:3000+ destination… --target=ci --insecure-registry=app-http-service.forgejo.svc.cluster.local:3000 --destination=app-http-service.forgejo.svc.cluster.local:3000/actions/sindri:ci-abc;config.jsonkeyed on that host:portREGISTRY_INSECURE=tureError: REGISTRY_INSECURE must be true or false (got 'ture')., exit 1sh -npasses.shellcheck -s shreports nothing new: a warning on the existingevalon line 10, and SC2086 infos on the intentionally unquoted$…_FLAGarguments, which follow the existing$TARGET_FLAG/$DEST_FLAGSpattern.Not yet verified: an actual push through the internal Service. Pushing this branch makes
docker-devpublishgit.van-hemmen.com/actions/kaniko:<sha>. A companionactions/sindribranch uses that image withREGISTRY_INSECURE=trueas the end-to-end test, and I'll report the result on this PR.After merge
Tag a release so
actions/sindri's workflows can pin the new version.Closes #7
🤖 Generated with Claude Code
https://claude.ai/code/session_01XPajGyTH2js52mY5WSJoNA