Commit Graph

519 Commits

Author SHA1 Message Date
unkin-agent 876a52f5de Allow g10kng image builds on iuclabs-build runners
ci/woodpecker/pr/pre-commit Pipeline was successful
ci/woodpecker/pr/kubeconform Pipeline was successful
2026-11-29 21:43:00 +11:00
unkin-agent 8c89182762 Bump artifactapi to v3.27.0 (#621)
v3.27.0 adds API-managed GitHub Apps and encrypts their private keys with the Vault transit config already set on the deployment.

- bump artifactapi and artifactapi-ui images to v3.27.0

Reviewed-on: #621
Co-authored-by: unkin-agent <unkin-agent@unkin.net>
Co-committed-by: unkin-agent <unkin-agent@unkin.net>
2026-11-29 19:28:05 +11:00
unkin-agent 87dad4c89b Encrypt artifactapi GitHub App keys with Vault transit (#616)
artifactapi stores GitHub App private keys in Postgres in plaintext. It can now encrypt them with a Vault transit key, logging in via Kubernetes auth.

- enable transit encryption of GitHub App keys on the api Deployment
- point it at Vault (`k8s/au/syd1` role `artifactapi`, transit key `artifactapi-github-app-keys`) using the combined CA bundle
- mount a projected SA token with audience `vault` for the login

Requires IUCLabs/terraform-vault#15 applied and an artifactapi release containing IUCLabs/artifactapi#22.

Reviewed-on: #616
Co-authored-by: unkin-agent <unkin-agent@unkin.net>
Co-committed-by: unkin-agent <unkin-agent@unkin.net>
2026-11-29 17:45:07 +11:00
unkin-agent b9c962dc28 Match iuclabs-dind docker MTU to the pod network (#620)
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>
2026-11-29 09:24:52 +11:00
unkin-agent 13e8d3f7df Run bind and kea operators from GitHub releases (#618)
bind-operator and kea-operator now publish releases to GitHub, so their images and CRDs come from ghcr.io and the IUCLabs repos instead of the internal docker registry and Gitea raw URLs.

- bind-operator runs ghcr.io/iuclabs/bind-operator:v0.4.1, tsig-api ghcr.io/iuclabs/bind-tsig-api:v0.4.1
- kea-operator runs ghcr.io/iuclabs/kea-operator:v0.1.8, with kea and kea-api from ghcr.io/iuclabs at v0.1.8
- bind and kea CRDs load from the IUCLabs repos at those tags via the artifactapi github remote

Requires IUCLabs/terraform-artifactapi #11 applied first.

Reviewed-on: #618
Co-authored-by: unkin-agent <unkin-agent@unkin.net>
Co-committed-by: unkin-agent <unkin-agent@unkin.net>
2026-11-28 16:07:56 +11:00
unkin-agent 27459cb246 Route iuclabs runner uv python downloads through artifactapi (#619)
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>
2026-11-28 15:58:06 +11:00
unkin-agent a56db70937 Route iuclabs runner package installs through artifactapi (#617)
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>
2026-11-28 14:58:01 +11:00
unkin-agent 3d3f7fef14 Allow container-puppet-pr-validator on build runners (#615)
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>
2026-11-28 14:56:51 +11:00
unkin-agent d42e7ebe61 Let iuclabs-dind pull images from artifactapi (#614)
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>
2026-11-28 13:48:47 +11:00
unkin-agent 65578fe3d3 Drop archived agent image repos from build runners (#613)
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>
2026-11-28 13:07:59 +11:00
unkin-agent 100baefc6d Bump artifactapi to v3.26.3 (#612)
Ship serve-time npm, helm and terraform link rewriting, so releases_remote routes provider zips through the cache, plus the probe settings refresh fix.

- bump api, image-keeper and ui images to v3.26.3

Reviewed-on: #612
Reviewed-by: BenVincent <benvin@main.unkin.net>
Co-authored-by: unkin-agent <unkin-agent@unkin.net>
Co-committed-by: unkin-agent <unkin-agent@unkin.net>
2026-11-28 01:36:22 +11:00
unkin-agent eac424d7f5 Drop archived CI image repos from build runners (#611)
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>
2026-11-27 22:41:53 +11:00
unkin-agent 2b4f4a2fb9 Add iuclabs-build runner scale set (#610)
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>
2026-11-27 22:27:39 +11:00
unkin-agent e4ce10f501 Point cephrgw-operator at s3.ceph.unkin.net (#609)
The operator still reached the radosgw Admin Ops and S3 APIs via radosgw.service.consul, an endpoint seeded in Vault. RGW is now served at s3.ceph.unkin.net, whose chain verifies against vault-ca-cert.

- Sets CEPH_RGW_ENDPOINT and CEPH_RGW_ADMIN_ENDPOINT to https://s3.ceph.unkin.net in the Deployment env, overriding any endpoint in the Vault-rendered secret
- Drops the endpoint keys from the Vault seed instructions

Reviewed-on: #609
Co-authored-by: unkin-agent <unkin-agent@unkin.net>
Co-committed-by: unkin-agent <unkin-agent@unkin.net>
2026-11-27 22:03:46 +11:00
unkin-agent 5a55fefa25 Bump artifactapi to v3.26.2 (#608)
Ship the global settings API, S3 health status on the dashboard, the probe TTL and interval fixes, and pypi wheel caching through the proxy.

- bump api, image-keeper and ui images to v3.26.2

Reviewed-on: #608
Co-authored-by: unkin-agent <unkin-agent@unkin.net>
Co-committed-by: unkin-agent <unkin-agent@unkin.net>
2026-11-27 20:32:26 +11:00
unkin-agent c090015686 Deploy coroot behind oauth2-proxy (#605)
Coroot gives eBPF-based service maps, tracing and RCA for the cluster; the community edition has no OIDC, so it sits behind oauth2-proxy.

- add coroot-operator chart 0.10.8 in coroot-system (platform)
- add a Coroot CR: 2 replicas on CNPG, ClickHouse 2 + keeper 3, metrics via vmcluster/main, pinned images
- agents send keyless; Coroot binds an empty key to its single default project
- front coroot.unkin.net with oauth2-proxy (Authentik, akP-coroot-admin); Coroot grants Admin to anonymous
- restrict Coroot ingress to oauth2-proxy and the agents; PDBs, anti-affinity, DNS, wildcard cert, schema

Requires IUCLabs/terraform-artifactapi#7 and IUCLabs/terraform-authentik#7.

Reviewed-on: #605
Co-authored-by: unkin-agent <unkin-agent@unkin.net>
Co-committed-by: unkin-agent <unkin-agent@unkin.net>
2026-11-27 07:55:38 +11:00
unkin-agent ad369d0f7e Run pdbmux and cephrgw-operator from ghcr (#607)
pdbmux and cephrgw-operator now publish releases to GitHub, so their images and CRDs come from ghcr.io and the IUCLabs repo instead of the internal docker registry and Gitea raw URL.

- pdbmux runs ghcr.io/iuclabs/pdbmux:v0.5.1
- cephrgw-operator runs ghcr.io/iuclabs/cephrgw-operator:v0.4.1
- cephrgw CRDs load from IUCLabs/cephrgw-operator at v0.4.1 via the artifactapi github remote

Requires IUCLabs/terraform-artifactapi #9 applied first.

---------

Co-authored-by: BenVincent <benvin@main.unkin.net>
Reviewed-on: #607
Co-authored-by: unkin-agent <unkin-agent@unkin.net>
Co-committed-by: unkin-agent <unkin-agent@unkin.net>
2026-11-27 07:52:25 +11:00
unkin-agent 398ea49a16 Add iuclabs-dind ARC runner scale set (#606)
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>
2026-11-27 07:39:18 +11:00
unkin-agent ecbdcaee96 artifactapi: bump to v3.26.0 (#604)
Roll out v3.26.0: cache misses stream straight from upstream while S3 is unhealthy instead of failing.

- bump artifactapi and artifactapi-ui images to v3.26.0

Reviewed-on: #604
Co-authored-by: unkin-agent <unkin-agent@unkin.net>
Co-committed-by: unkin-agent <unkin-agent@unkin.net>
2026-11-27 06:37:31 +11:00
unkin-agent 81626164f8 Bump jellyfin-ha to v0.5.0 (#603)
jellyfin-ha v0.5.0 repins jellyfin-ha-src main, which shares session and quick connect state across replicas and fails closed at startup if the quick connect store is unavailable. Still Jellyfin 12.0.

- bump cheeztv jellyfin-ha image to v0.5.0
- bump fafflix jellyfin-ha image to v0.5.0

Reviewed-on: #603
Co-authored-by: unkin-agent <unkin-agent@unkin.net>
Co-committed-by: unkin-agent <unkin-agent@unkin.net>
2026-11-27 00:27:49 +11:00
unkin-agent e21ef90351 Recreate Jellyfin PVCs on raid6 and restore replicas (#602)
Final step of moving the Jellyfin CephFS PVCs off raid5: the PVCs come back under their original names on raid6 and the StatefulSets scale back up. The unrendered prowlarr config PVC moves to raid6 as well.

- recreate cheeztv/fafflix config and transcode PVCs on cephfs-raid6-delete
- restore cheeztv and fafflix StatefulSets to 2 replicas
- switch prowlarr-config to cephfs-raid6-retain

Reviewed-on: #602
Co-authored-by: unkin-agent <unkin-agent@unkin.net>
Co-committed-by: unkin-agent <unkin-agent@unkin.net>
2026-11-27 00:26:57 +11:00
unkin-agent ae9234886f Remove cheeztv and fafflix config and transcode PVCs (#601)
storageClassName is immutable, so the raid5 Jellyfin PVCs are pruned here and recreated on raid6 under the same names in the follow-up PR. The delete reclaim policy discards their contents.

- remove cheeztv-config, cheeztv-transcode, fafflix-config and fafflix-transcode PVCs

Reviewed-on: #601
Co-authored-by: unkin-agent <unkin-agent@unkin.net>
Co-committed-by: unkin-agent <unkin-agent@unkin.net>
2026-11-27 00:10:41 +11:00
unkin-agent 994d408c8f Scale cheeztv and fafflix to zero (#600)
storageClassName is immutable, so moving the Jellyfin config/transcode PVCs from raid5 to raid6 means deleting and recreating them under the same names. Pods must be gone first so the PVCs can actually be released.

- set cheeztv and fafflix StatefulSets to replicas: 0

Reviewed-on: #600
Co-authored-by: unkin-agent <unkin-agent@unkin.net>
Co-committed-by: unkin-agent <unkin-agent@unkin.net>
2026-11-27 00:02:53 +11:00
unkin-agent b6060d2fde Remove undeployed paperclip app (#598)
Paperclip was never deployed (no overlay, namespace or Argo Application), so its base manifests and references are dead config.

- remove apps/base/paperclip
- drop paperclip from the aitooling ApplicationSet and AppProject
- drop paperclip from the CA rotation and CNPG backup docs

Reviewed-on: #598
Co-authored-by: unkin-agent <unkin-agent@unkin.net>
Co-committed-by: unkin-agent <unkin-agent@unkin.net>
2026-11-25 23:20:01 +11:00
unkin-agent c7b1fddcb8 Point S3 consumers at s3.ceph.unkin.net (#586)
The legacy Incus RGWs behind `radosgw.service.consul` are being retired; `s3.ceph.unkin.net` is the canonical S3 name that follows the k8s RGW and is already a SAN on the RGW certs.

- switch artifactapi `MINIO_ENDPOINT` to `s3.ceph.unkin.net`
- switch paperclip `PAPERCLIP_STORAGE_S3_ENDPOINT` to `https://s3.ceph.unkin.net`
- switch authentik `AUTHENTIK_STORAGE__S3__ENDPOINT` to `https://s3.ceph.unkin.net/`

Part of #582

Reviewed-on: #586
Co-authored-by: unkin-agent <unkin-agent@unkin.net>
Co-committed-by: unkin-agent <unkin-agent@unkin.net>
2026-11-24 23:32:06 +11:00
unkin-agent 30b082a211 Add public main.unkin.net and edge.unkin.net zones to bind-external (#564)
Mail needs public MX/SPF/DMARC on main.unkin.net and A records for the edge MTAs, served by bind-external and delegated from Google Cloud DNS like acme.unkin.net.

- add main.unkin.net and edge.unkin.net BindZones with apex NS acme-ns1.unkin.net.
- add edge mta1/mta2 A records
- add main mail-in A, apex MX and SPF TXT, _dmarc TXT
- carry over the public main.unkin.net CNAMEs from Google (_acme-challenge and the lb1.unkin.net hosts)

Reviewed-on: #564
Co-authored-by: unkin-agent <unkin-agent@unkin.net>
Co-committed-by: unkin-agent <unkin-agent@unkin.net>
2026-11-24 21:25:17 +11:00
unkin-agent 6c9ef79ad3 bind-internal: point s3.ceph.unkin.net at k8s RGW (#585)
The k8s RGW (ceph-system/rgw-external) is live, serves the same zone and buckets as the legacy Incus RGWs, and its cert covers s3.ceph.unkin.net. Moving the CNAME shifts S3 traffic off the VMs.

- repoint s3.ceph.unkin.net CNAME from radosgw.service.consul. to rgw.k8s.syd1.au.unkin.net.

Part of #582

Reviewed-on: #585
Co-authored-by: unkin-agent <unkin-agent@unkin.net>
Co-committed-by: unkin-agent <unkin-agent@unkin.net>
2026-11-24 21:23:21 +11:00
unkin-agent 82db9b41b2 Record per-host memory corruption log events from VictoriaLogs (#596)
Hosts have no ECC RAM, so failing memory raises no EDAC/MCE signal; it only shows up as scattered log lines (kernel segfaults/GPFs, ceph checksum and rocksdb key-order errors). Recording a per-host count of these symptoms makes bad RAM visible in VictoriaMetrics.

- add vmalert `logs` in logging, querying VictoriaLogs and writing to vminsert-main
- add VMRule recording `host:corruption_log_events:count` by host from LogsQL
- select vlogs rules by the `vmalert.unkin.net/datasource` label and exclude them from vmalert `main`

Reviewed-on: #596
Co-authored-by: unkin-agent <unkin-agent@unkin.net>
Co-committed-by: unkin-agent <unkin-agent@unkin.net>
2026-11-24 21:22:41 +11:00
unkin-agent 2724aaf1c5 media: move shared media PVs to csi_ssd_ec_6_2 (#597)
The shared media data now lives in the `csi_ssd_ec_6_2` subvolume group; the static CephFS PVs still point at the old `csi_ssd_ec_4_1` subvolumes.

- point the mediastore, media-tv and media-movies PVs (arrstack, cheeztv, fafflix, mediamark) at `clusterID: cephfs_csi_ssd_ec_6_2`
- update each PV `rootPath` to the matching ec_6_2 subvolume path

Delete the existing PVs/PVCs at cutover; PV spec is immutable, so ArgoCD recreates them under the same names.

Reviewed-on: #597
Co-authored-by: unkin-agent <unkin-agent@unkin.net>
Co-committed-by: unkin-agent <unkin-agent@unkin.net>
2026-11-24 21:22:09 +11:00
unkin-agent 8d27f191bf Add autocraft app (#595)
AutoCraft (IUCLabs/autocraft) needs a home in the cluster: one SQLite-backed pod running dashboard, runner and sync, signing in through the iuclabs-coder GitHub App.

- add autocraft StatefulSet (1 replica, data/config PVCs) with bwrap runner settings
- render secrets.json from kv/service/github/iuclabs/coder via VSO; init container installs it 0600 with a persistent session key
- restart the StatefulSet when the Vault secret changes
- serve autocraft.unkin.net from traefik-external with the reflected wildcard cert
- register autocraft in the aitooling ApplicationSet/AppProject

Requires IUCLabs/terraform-vault #11 applied first.

Reviewed-on: #595
Co-authored-by: unkin-agent <unkin-agent@unkin.net>
Co-committed-by: unkin-agent <unkin-agent@unkin.net>
2026-11-23 21:50:14 +11:00
unkin-agent 5b2fb304ec Pull IUCLabs images from ghcr (#594)
IUCLabs images now publish only to ghcr.io/iuclabs; the docker-internal pins stopped updating.

- Pin encapi to ghcr.io/iuclabs/encapi:v0.3.3
- Pin artifactapi and artifactapi-ui (deployments and image-keeper) to ghcr.io/iuclabs/*:v3.25.5
- Pulls route through the existing artifactapi ghcr remote (^iuclabs/ allowed) via the rke2 ghcr.io mirror

Depends on: the ghcr packages being public (anonymous pulls); no other change needed.

Reviewed-on: #594
Co-authored-by: unkin-agent <unkin-agent@unkin.net>
Co-committed-by: unkin-agent <unkin-agent@unkin.net>
2026-11-22 16:47:03 +11:00
unkin-agent b65f86b53c Refuse all fork pull requests on IUCLabs runners (#593)
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>
2026-11-21 14:51:06 +11:00
unkin-agent e1241811c9 Raise iuclabs-infra to 6 runners (#592)
The five terraform repos move plan/apply onto iuclabs-infra; two runners would queue their PR plans behind each other.

- raise iuclabs-infra maxRunners 2 → 6

Reviewed-on: #592
Co-authored-by: unkin-agent <unkin-agent@unkin.net>
Co-committed-by: unkin-agent <unkin-agent@unkin.net>
2026-11-21 13:05:15 +11:00
unkin-agent a163c26860 add iuclabs-infra runner scale set for terraform repos (#591)
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>
2026-11-21 00:25:54 +11:00
unkin-agent a90cc37340 grafana: add nDPI app panels to router dashboard (#590)
ntopng now ships nDPI per-application and per-category byte counters plus flow counts into VictoriaMetrics, but the router dashboard only shows raw interface bandwidth, so there is no view of what the traffic actually is.

- add "Applications (nDPI)" row after Bandwidth: top 10 apps, app share pie, top 10 categories, flows
- add collapsed "Apps by category (nDPI)" row: one stacked panel per active category, filtering apps by nDPI's app→category map (the metric has no category label)
- add `ifid` (Interface) and `window` (Share window) variables
- shift later rows down to fit

Reviewed-on: #590
Co-authored-by: unkin-agent <unkin-agent@unkin.net>
Co-committed-by: unkin-agent <unkin-agent@unkin.net>
2026-11-18 23:10:22 +11:00
unkin-agent ef2e6f2c80 add iuclabs-release tag-only runner scale set (#589)
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>
2026-11-18 23:00:05 +11:00
unkin-agent e9a27d3377 grafana: add router/firewall dashboard for prodnxsr0020 (#588)
prodnxsr0020 has no single view of its interface bandwidth, conntrack/softnet health, shorewall drop/reject logs and OSPF state.

- add `router-firewall` GrafanaDashboard: overview stats, per-interface bandwidth (Internet/Lab/Home), system, firewall (VictoriaLogs) and routing rows
- firewall panels count rate-limited kernel LOG lines (logged events, not packets)
- host set via a hidden `host` constant

Reviewed-on: #588
Co-authored-by: unkin-agent <unkin-agent@unkin.net>
Co-committed-by: unkin-agent <unkin-agent@unkin.net>
2026-11-16 21:31:06 +11:00
unkin-agent e63b85d5a5 vlogs: accept Vault identity JWTs and run oauth2-proxy HA (#587)
Agents need programmatic vlogs access with short-lived Vault identity OIDC tokens, and the oauth2-proxy runs as a single replica.

- accept Vault identity JWT bearer tokens (audience `victorialogs`) via extra JWT issuer
- run oauth2-proxy with 2 replicas spread across nodes
- add a PodDisruptionBudget (minAvailable 1)

requires terraform-vault #179 applied first

Reviewed-on: #587
Co-authored-by: unkin-agent <unkin-agent@unkin.net>
Co-committed-by: unkin-agent <unkin-agent@unkin.net>
2026-11-16 21:30:39 +11:00
unkin-agent 04f9d37a7f ceph-system: serve rgw over TLS on a PureLB IP (#584)
The in-cluster RGW only listens on plain HTTP via a ClusterIP, so S3 clients outside the cluster cannot reach it. TLS terminates in beast to avoid proxy body-size and timeout limits on large uploads.

- add a vault-issuer Certificate covering the existing radosgw SANs, rgw.k8s.syd1.au.unkin.net and 198.18.200.11
- mount the cert and enable beast ssl_port 7443, keeping 7480 for probes
- add rgw-external LoadBalancer on 198.18.200.11:443 with externalTrafficPolicy Local

Part of #582

Reviewed-on: #584
Co-authored-by: unkin-agent <unkin-agent@unkin.net>
Co-committed-by: unkin-agent <unkin-agent@unkin.net>
2026-11-15 22:19:06 +11:00
unkin-agent 26e53ee35c ceph-system: run radosgw as a deployment (#583)
Part of #582. RGW runs on VMs (ausyd1nxvm2115-2119) and needs to move into k8s under GitOps; this adds the `ceph-system` namespace with an in-cluster RGW behind a ClusterIP service. Cutover comes later.

- add `ceph-system` app to the platform applicationset
- add ceph.conf configmap with a shared `client.rgw.syd1` section and explicit keyring path
- add rgw keyring from vault `kubernetes/namespace/ceph-system/default/rgw-keyring` (`keyring`)
- add 3-replica `quay.io/ceph/ceph:v18.2.8` radosgw deployment, non-root, read-only root, startup probe, hard per-node spread, PDB + VPA
- add ClusterIP service `rgw` on 7480

Requires unkin/terraform-artifactapi#78 merged first.

Reviewed-on: #583
Co-authored-by: unkin-agent <unkin-agent@unkin.net>
Co-committed-by: unkin-agent <unkin-agent@unkin.net>
2026-11-15 21:51:59 +11:00
unkin-agent 166605d3f1 iuclabs-runners: trust Vault CA in runner pods (#581)
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>
2026-11-14 22:02:55 +11:00
unkin-agent 283ccde24f Enable ARC metrics with VictoriaMetrics scrapes and dashboard (#580)
ARC runs with metrics disabled, so scale-set behaviour (assigned jobs, desired/idle runners, job startup time) and controller health are invisible.

- enable controller and listener metrics on :8080 via chart `metrics:` values
- add VMPodScrapes for the controller and listener pods in arc-system
- keep runner-namespace labels on listener/ephemeral-runner series so the dashboard filters match
- add the upstream ARC Autoscaling Runner Set dashboard (gha-runner-scale-set-0.15.1) resolved to VictoriaMetrics

Reviewed-on: #580
Co-authored-by: unkin-agent <unkin-agent@unkin.net>
Co-committed-by: unkin-agent <unkin-agent@unkin.net>
2026-11-11 00:17:16 +11:00
unkin-agent fd3446ae8a Add ARC self-hosted runners for IUCLabs (#579)
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>
2026-11-10 23:27:40 +11:00
unkin-agent 19f7919851 puppet: bump compiler encapic to v0.4.0 (#578)
Keep the k8s puppetserver compilers on the current encapic release, matching the VM masters.

- Bump `ENCAPIC_VERSION` in the compiler initContainer from v0.1.0 to v0.4.0.

Reviewed-on: #578
Co-authored-by: unkin-agent <unkin-agent@unkin.net>
Co-committed-by: unkin-agent <unkin-agent@unkin.net>
2026-11-08 22:14:48 +11:00
unkin-agent 7c4a01785b encapi: bump to v0.3.0 (#577)
Ships the encapi testing restore endpoint (restore a node from testing to its recorded previous environment).

- Bump encapi image pin v0.2.0 -> v0.3.0 in apps/base/encapi/deployment.yaml
- v0.3.0 adds migration 0002 (previous_environment column), applied by encapi on startup

Reviewed-on: #577
Co-authored-by: unkin-agent <unkin-agent@unkin.net>
Co-committed-by: unkin-agent <unkin-agent@unkin.net>
2026-11-08 17:53:48 +11:00
unkin-agent 592b2ec9e2 Mount per-pod emptyDir for puppetdb logs (#576)
Both puppetdb replicas write logback logs to the same logs/ dir on the shared RWX PVC. Concurrent rollovers race on compression and leave orphaned .tmp files that maxHistory never removes, eventually filling the volume quota and failing /pdb/cmd/v1 with "Disk quota exceeded".

- mount a per-pod emptyDir (sizeLimit 512Mi) at /opt/puppetlabs/server/data/puppetdb/logs

Reviewed-on: #576
Co-authored-by: unkin-agent <unkin-agent@unkin.net>
Co-committed-by: unkin-agent <unkin-agent@unkin.net>
2026-11-08 17:53:23 +11:00
unkin-agent dadada0274 Bump artifactapi to v3.25.2 (#575)
v3.25.2 preserves repo_type on remote update (with a repair migration), fixing 404s on virtual repo redirects, and lets registry /v2/token accept OAuth2 POST form credentials, fixing 401s on buildkit/helm OCI pushes.

- bump artifactapi API image to v3.25.2
- bump artifactapi-ui image to v3.25.2
- bump image-keeper api and ui images to v3.25.2

Reviewed-on: #575
Co-authored-by: unkin-agent <unkin-agent@unkin.net>
Co-committed-by: unkin-agent <unkin-agent@unkin.net>
2026-11-08 11:56:51 +11:00
unkin-agent a4efca8ee5 Require tokens for artifactapi uploads (#574)
Woodpecker uploaders now mint Vault OIDC tokens, so anonymous local-repo writes can be rejected.

- set `ARTIFACTAPI_AUTH_UPLOADS: "true"` in the artifactapi `api-env` configmap

Merge after unkin/vault-plugin-secrets-litellm#6.

Reviewed-on: #574
Co-authored-by: unkin-agent <unkin-agent@unkin.net>
Co-committed-by: unkin-agent <unkin-agent@unkin.net>
2026-10-26 20:33:29 +11:00
unkin-agent 0552be6028 Bump artifactapi to v3.25.0 (#573)
Artifactapi v3.25.0 adds github_rpm cache_repodata toggle and general fixes.

- Bump artifactapi and artifactapi-ui images to v3.25.0

Reviewed-on: #573
Co-authored-by: unkin-agent <unkin-agent@unkin.net>
Co-committed-by: unkin-agent <unkin-agent@unkin.net>
2026-10-25 23:45:54 +11:00
unkin-agent 4b5d14cf52 Bump artifactapi to v3.24.0 (#572)
Pull in artifactapi v3.24.0 images (per-remote sync_interval and GitHub sync spreading).

- Update artifactapi image from v3.23.0 to v3.24.0
- Update artifactapi-ui image from v3.23.0 to v3.24.0

Reviewed-on: #572
Co-authored-by: unkin-agent <unkin-agent@unkin.net>
Co-committed-by: unkin-agent <unkin-agent@unkin.net>
2026-10-25 20:25:21 +11:00