IUCLabs/g10kng now builds a container image, and the iuclabs-build job-started hook refuses repos outside its allowlist.
- add IUCLabs/g10kng to the build runner allowlist
Reviewed-on: #622
Co-authored-by: unkin-agent <unkin-agent@unkin.net>
Co-committed-by: unkin-agent <unkin-agent@unkin.net>
Job containers on iuclabs-dind get TLS connection resets (e.g. actions/checkout to github.com) because dockerd defaults its bridges to MTU 1500 while the canal vxlan pod network is 1450.
- set dockerd `--mtu=1450`
- default new bridge networks (the runner's job network) to MTU 1450
Reviewed-on: #620
Co-authored-by: unkin-agent <unkin-agent@unkin.net>
Co-committed-by: unkin-agent <unkin-agent@unkin.net>
IUCLabs runners only reach artifactapi, so `uv python install` fails fetching python-build-standalone from GitHub. The artifactapi `github` remote now allows those release assets.
- set `UV_PYTHON_INSTALL_MIRROR` to the artifactapi `github` remote python-build-standalone releases path
Reviewed-on: #619
Co-authored-by: unkin-agent <unkin-agent@unkin.net>
Co-committed-by: unkin-agent <unkin-agent@unkin.net>
IUCLabs runner jobs pull pip, uv, go and npm packages straight from public registries because their egress blocks traefik-internal and their tools do not trust the internal CA.
- add an artifactapi component setting pip, uv, go, npm, yarn and corepack registry env on every runner
- build a combined public + internal CA bundle in an init container for SSL_CERT_FILE and REQUESTS_CA_BUNDLE
- allow every runner egress to traefik-internal on 443, replacing the dind and build copies
Reviewed-on: #617
Co-authored-by: unkin-agent <unkin-agent@unkin.net>
Co-committed-by: unkin-agent <unkin-agent@unkin.net>
The puppet-prod validator image moves to its own IUCLabs container repo, whose image builds run on iuclabs-build.
- add IUCLabs/container-puppet-pr-validator to the build runner repo allowlist
- cover it in the runner hook tests
Requires IUCLabs/terraform-git #35 applied for the repo to exist.
Reviewed-on: #615
Co-authored-by: unkin-agent <unkin-agent@unkin.net>
Co-committed-by: unkin-agent <unkin-agent@unkin.net>
Jobs on iuclabs-dind need images from artifactapi docker-internal as git.unkin.net goes away, but the runner's egress blocks traefik-internal and its dind daemon does not trust the internal CA.
- allow iuclabs-dind egress to traefik-internal on 443
- mount the vault CA into the dind daemon's certs.d for artifactapi
Reviewed-on: #614
Co-authored-by: unkin-agent <unkin-agent@unkin.net>
Co-committed-by: unkin-agent <unkin-agent@unkin.net>
container-agent-base, -dev and -infra are archived and no longer build.
- Removes the three repos from the `build)` allowlist in `job-started.sh`.
- Updates `ci/test-runner-hooks.sh` so the allowlist is the remaining four repos.
Reviewed-on: #613
Co-authored-by: unkin-agent <unkin-agent@unkin.net>
Co-committed-by: unkin-agent <unkin-agent@unkin.net>
Why: container-gobuilder, container-opentofu and container-tea are being archived, not migrated, so build runners should no longer accept them.
- Remove the three repos from the build) allowlist in job-started.sh (7 repos remain)
- Remove them from the allowed list in ci/test-runner-hooks.sh
Reviewed-on: #611
Co-authored-by: unkin-agent <unkin-agent@unkin.net>
Co-committed-by: unkin-agent <unkin-agent@unkin.net>
IUCLabs rpmbuilder and container repos need a runner that can build images and publish to artifactapi, without opening that egress to every dind job.
- Adds the `iuclabs-build` scale set (copy of `iuclabs-dind`, `RUNNER_MODE=build`, same min/max runners)
- Allows egress to traefik-internal on 443/80 on top of the dind rules
- Mounts `vault-ca-cert` as the dind registry CA for artifactapi.k8s.syd1.au.unkin.net
- `job-started.sh` restricts build mode to IUCLabs/rpmbuilder and the listed container-* repos, then applies the usual event checks
- Extends `ci/test-runner-hooks.sh` with build-mode cases
Reviewed-on: #610
Co-authored-by: unkin-agent <unkin-agent@unkin.net>
Co-committed-by: unkin-agent <unkin-agent@unkin.net>
IUCLabs e2e tests need a Docker daemon, which the unprivileged runners can't provide. A separate scale set runs a privileged dind sidecar so existing runners stay unprivileged.
- add `iuclabs-dind` AutoscalingRunnerSet using the 0.15.1 chart's dind pod shape (externals init, native `docker.io/library/docker:29.9.3-dind` sidecar, `DOCKER_HOST` socket)
- cap emptyDirs (`/var/lib/docker` 30Gi, `_work` 20Gi) and set cpu/memory/ephemeral-storage on every container, dind sized above both volumes
- add its egress NetworkPolicy mirroring the other scale sets
Depends on artifactapi allowing `library/docker` (IUCLabs/terraform-artifactapi#8).
Reviewed-on: #606
Co-authored-by: unkin-agent <unkin-agent@unkin.net>
Co-committed-by: unkin-agent <unkin-agent@unkin.net>
A pull_request job from a fork runs the fork's own workflow, Makefile and pre-commit config on the self-hosted runners before review. Fork PRs authored by members or collaborators were still allowed through.
- job-started hook refuses every pull_request whose head repo differs from the base repo, regardless of author association
- hook tests expect member fork PRs to be refused on default and infra runners
Reviewed-on: #593
Co-authored-by: unkin-agent <unkin-agent@unkin.net>
Co-committed-by: unkin-agent <unkin-agent@unkin.net>
The IUCLabs terraform repos plan/apply from GitHub Actions, but the existing scale sets only reach public :443 and Vault, so they cannot reach the Consul state backend or the internal provider endpoints.
- add `iuclabs-infra` scale set (runs-on `iuclabs-infra`, max 2 runners)
- add `infra` hook mode allowing only IUCLabs/terraform-{git,vault,artifactapi,authentik,binarylane}
- allow egress to Consul, Vault, traefik-internal/external, rke2-ingress-nginx, authentik-server and public :443
- extend runner hook tests for the infra mode
Reviewed-on: #591
Co-authored-by: unkin-agent <unkin-agent@unkin.net>
Co-committed-by: unkin-agent <unkin-agent@unkin.net>
IUCLabs release workflows must upload to artifactapi, which the default runner set cannot reach. A separate tag-only scale set keeps that access away from branch and PR jobs.
- add `iuclabs-release` scale set (0-2 runners) with `RUNNER_MODE=release`; `iuclabs-k8s` sets `RUNNER_MODE=default`
- job-started hook refuses any job when `RUNNER_MODE` is unset, empty or unknown
- release mode allows only `push` of `refs/tags/v[0-9]*`
- release egress allows traefik-internal pods on 443, which reaches every internal gateway host, not only artifactapi; L4 cannot narrow it and the alternative is plain HTTP to the api pods carrying a bearer token
- hook tests cover both modes and missing/invalid mode
Reviewed-on: #589
Co-authored-by: unkin-agent <unkin-agent@unkin.net>
Co-committed-by: unkin-agent <unkin-agent@unkin.net>
Workflows on the iuclabs-k8s scale set log into https://vault.service.consul:8200, which serves a cert from the internal unkin.net CA that the runner image does not trust, so vault-action and curl fail TLS verification.
- Mount the reflected `vault-ca-cert` Secret read-only at `/etc/vault-ca` in the runner container.
- Set `NODE_EXTRA_CA_CERTS=/etc/vault-ca/ca.crt` so Node actions (vault-action) trust it alongside public CAs.
- curl callers pass `--cacert /etc/vault-ca/ca.crt`; `SSL_CERT_FILE` stays untouched to keep public TLS working.
Reviewed-on: #581
Co-authored-by: unkin-agent <unkin-agent@unkin.net>
Co-committed-by: unkin-agent <unkin-agent@unkin.net>
IUCLabs public repos need self-hosted CI capacity, but anyone can open PRs there, so runners must only execute trusted code and must not reach internal services.
- deploy the ARC controller chart in arc-system, pulled through artifactapi
- keep shared runner resources (namespace, manager Role/RoleBinding, VSO secret, hooks) in the iuclabs-runners base
- package each scale set as a kustomize component (AutoscalingRunnerSet + its HTTPS/Vault egress policy), starting with iuclabs-k8s
- allow only push/dispatch/schedule/merge_group/release and trusted pull_request jobs via a job-started hook, tested in pre-commit
- default-deny the namespace and allow DNS
Depends on the github-app secret existing in Vault.
Reviewed-on: #579
Co-authored-by: unkin-agent <unkin-agent@unkin.net>
Co-committed-by: unkin-agent <unkin-agent@unkin.net>