Migrate deploy off GitHub Actions to Forgejo + in-cluster registry #25
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
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?
Context
GitHub no longer joins the tailnet (all
TS_*secrets removed from this repo + 4 others). The in-cluster registry bridge is live and verified:192.168.0.194:30500(NodePort, namespaceregistry, pinned to kai-server, plain http).registries.yamlinsecure entry; a probe image round-tripped over plain-http (coilysiren/infrastructure#168, #171).forgejo-runnerDinD carries--insecure-registry=192.168.0.194:30500.originpushes to both GitHub and Forgejo). Forgejo Actions runs on the in-cluster runner (kai-desktop-tower-wsl node, DinD sidecar,DOCKER_HOST=tcp://localhost:2375).Goal
Replace
.github/workflows/build-and-publish.yml(dead - it joined the tailnet via OIDC, which is gone) with a Forgejo Actions workflow that builds, pushes to the in-cluster registry, and rolls the deployment. No tailnet join, no GHCR, no SSH.Work (one PR)
Access control - deployer SA + kubeconfig
deploy/add adeployerServiceAccount incoilysiren-backend, a Role (verbs: get/patch ondeployments, get ondeployments/status, get/list onpods), a RoleBinding, and a long-livedkubernetes.io/service-account-tokenSecret for the SA.https://192.168.0.194:6443(LAN IP is in the k3s API cert SANs), CA + token from the SA Secret. Store it base64 as a Forgejo Actions secretDEPLOY_KUBECONFIGon this repo (Forgejo UI/API). Keep the token out of git; note where it lives..forgejo/workflows/build-publish-deploy.ymlon: push: branches: [main].test:uv sync --frozen+uv run pytest.deploy(needs test):192.168.0.194:30500/coilysiren-backend:${{ github.sha }}, push (the runner's DinD is the docker host).$DEPLOY_KUBECONFIGto a file,kubectl set image deploy/coilysiren-backend-app coilysiren-backend=<ref> -n coilysiren-backend,kubectl rollout status ... --timeout=5m.report status to datastorestep (if: always(), POST tohttp://api/document, namespaceci-status).deploy/main.yml- switch the app image to the registry ref scheme;imagePullPolicy: Always. Update the stale "No GHCR pull-secret / sideloaded into containerd" comments to describe the registry pull.Makefile- pointimage-urlat192.168.0.194:30500/.... The.deploytarget stays (structural manifest applies).Remove
.github/workflows/build-and-publish.yml.Verify - push, watch the Forgejo run, confirm a new pod rolls with the
192.168.0.194:30500/...image.Constraints / gotchas
registries.yamlis on kai-server only (#171), so pulls land there - fine. Do not unpin without replicating registries.yaml.192.168.0.194:6443) over the LAN.TS_*/ OIDC tailnet join, and do NOT use GHCR. The ForgejoDEPLOY_KUBECONFIGsecret is the only stored credential.Links
e97885a.