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>
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>
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>
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>