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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
v3.23.0 adds virtual alpine repositories and drops local files and metadata when a repo is deleted.
- pin api, ui and image-keeper to v3.23.0
Reviewed-on: #571
Co-authored-by: unkin-agent <unkin-agent@unkin.net>
Co-committed-by: unkin-agent <unkin-agent@unkin.net>
v3.22.0 adds the vcs remote type for git provider source archives and release assets.
- pin api, ui and image-keeper to v3.22.0
Reviewed-on: #570
Co-authored-by: unkin-agent <unkin-agent@unkin.net>
Co-committed-by: unkin-agent <unkin-agent@unkin.net>
bind-operator v0.4.0 renders a forward BindZone without forwarders as `forwarders { };`, so the RBL direct-resolution zones no longer need raw zone clauses in the openforwarder view extraOptions.
- add rbl-zones.yaml with one forwarder-less forward BindZone per RBL domain
- remove the raw RBL zone lines from the openforwarder view
Reviewed-on: #569
Co-authored-by: unkin-agent <unkin-agent@unkin.net>
Co-committed-by: unkin-agent <unkin-agent@unkin.net>
encapi v0.2.0 authenticates writes with Vault identity OIDC tokens; it must validate the issuer, which is served with the internal Vault CA.
- bump encapi image to v0.2.0
- set ENCAPI_OIDC_ISSUER to the Vault identity OIDC issuer
- trust the Vault CA via a combined bundle and SSL_CERT_FILE, matching artifactapi
Reviewed-on: #567
Co-authored-by: unkin-agent <unkin-agent@unkin.net>
Co-committed-by: unkin-agent <unkin-agent@unkin.net>
v3.18.0 adds the ansible Galaxy remote plus local and virtual ansible repositories.
- pin api, ui and image-keeper to v3.18.0
Reviewed-on: #562
Co-authored-by: unkin-agent <unkin-agent@unkin.net>
Co-committed-by: unkin-agent <unkin-agent@unkin.net>
v3.16.0 adds local and virtual npm, the gems remote, HEAD on remotes, and fixes mutable refresh and per-request host handling.
- pin api, ui and image-keeper to v3.16.0
Reviewed-on: #560
Co-authored-by: unkin-agent <unkin-agent@unkin.net>
Co-committed-by: unkin-agent <unkin-agent@unkin.net>
v3.15.0 adds local helm and puppet repos, the nuget remote and a shared virtual merge cache.
- pin api, ui and image-keeper to v3.15.0
Reviewed-on: #559
Co-authored-by: unkin-agent <unkin-agent@unkin.net>
Co-committed-by: unkin-agent <unkin-agent@unkin.net>
bind-operator v0.4.0 applies config changes with `rndc reconfig` instead of restarting pods, which records the result in a new `status.appliedConfig` field and a `ConfigApplied` condition. It also renders `forwarders { };` for forward zones with no forwarders.
- bump the bind-operator image to v0.4.0
- bump the CRD install URL to the v0.4.0 tag
Reviewed-on: #558
Co-authored-by: unkin-agent <unkin-agent@unkin.net>
Co-committed-by: unkin-agent <unkin-agent@unkin.net>
The edge gateways now exist, so the smarthost and rspamd trust their real public IPs instead of the TEST-NET placeholders.
- set mta1 (66.226.148.207) and mta2 (66.226.149.50) in smarthost gateways.cidr
- allow both in the smarthost NetworkPolicy
- trust both in the rspamd external_relay ip_map
Reviewed-on: #556
Co-authored-by: unkin-agent <unkin-agent@unkin.net>
Co-committed-by: unkin-agent <unkin-agent@unkin.net>
The lab resolver is authoritative for unkin.net and main.unkin.net, so names that exist only in public DNS return NXDOMAIN internally. The edge MTAs and the smarthost resolve these names through it.
- add mail-in.main.unkin.net A 103.216.191.185 (home WAN)
- add mta1.edge.unkin.net A 66.226.148.207
- add mta2.edge.unkin.net A 66.226.149.50
- records mirror public DNS
Reviewed-on: #557
Co-authored-by: unkin-agent <unkin-agent@unkin.net>
Co-committed-by: unkin-agent <unkin-agent@unkin.net>
Recursing public names in-cluster SERVFAILs a few percent of cold lookups and loses the cache on every restart, which breaks CI. DNSBLs refuse or poison queries relayed via public resolvers, so rspamd's RBL lookups must keep resolving directly.
- add global forwarders 1.1.1.1 and 8.8.8.8 (forward first) to bind-resolvers
- add empty-forwarder zones to the openforwarder view for the RBL domains rspamd queries, so they resolve iteratively
Reviewed-on: #555
Co-authored-by: unkin-agent <unkin-agent@unkin.net>
Co-committed-by: unkin-agent <unkin-agent@unkin.net>
The second mail edge site moves to BinaryLane Brisbane (VPC 172.18.32.0/24), whose hosts resolve through the internal resolvers over the vpn.
- add 172.18.32.0/24 to acl-dmz
Reviewed-on: #554
Co-authored-by: unkin-agent <unkin-agent@unkin.net>
Co-committed-by: unkin-agent <unkin-agent@unkin.net>
The in-cluster BIND resolvers have no IPv6 route but still try every AAAA nameserver. Each attempt fails with "network unreachable" yet counts toward the per-query recursion budget, so cold lookups of names with many dual-stack NS (registry.opentofu.org, cloudfront, crates.io, gcr.io) hit `quota reached` and SERVFAIL, surfacing as transient DNS errors in CI.
- mark all IPv6 servers bogus in the openforwarder view so recursion is IPv4-only
Reviewed-on: #553
Co-authored-by: unkin-agent <unkin-agent@unkin.net>
Co-committed-by: unkin-agent <unkin-agent@unkin.net>
artifactapi v3.14.0 can require a Vault-issued bearer JWT for writes to /api/v2/remotes and /api/v2/virtuals, so config changes stop being open to anything in-cluster.
- bump artifactapi and artifactapi-ui images to v3.14.0
- set ARTIFACTAPI_OIDC_ISSUER to the Vault identity OIDC issuer and ARTIFACTAPI_OIDC_AUDIENCE to artifactapi
Requires terraform-artifactapi #64 merged first.
Reviewed-on: #552
Co-authored-by: unkin-agent <unkin-agent@unkin.net>
Co-committed-by: unkin-agent <unkin-agent@unkin.net>
BinaryLane only accepts RFC 1918 VPC ranges, so the syd and mel mail DMZ VPCs move from 198.18.30.0/24 and 198.18.31.0/24 to 172.18.30.0/24 and 172.18.31.0/24.
- replace the 198.18.30-31.0/24 entries in acl-dmz with 172.18.30.0/24 and 172.18.31.0/24
Reviewed-on: #551
Co-authored-by: unkin-agent <unkin-agent@unkin.net>
Co-committed-by: unkin-agent <unkin-agent@unkin.net>
The edge MTAs present certificates from the internal Vault PKI, so the smarthost cannot verify mta1/mta2.edge.unkin.net against the system CA bundle.
- pin both edge relay TLS policies to the internal CA via `tafile=`
- mount `vault-ca-cert` into the smarthost pods and reload on change
---------
Co-authored-by: BenVincent <benvin@main.unkin.net>
Reviewed-on: #548
Co-authored-by: unkin-agent <unkin-agent@unkin.net>
Co-committed-by: unkin-agent <unkin-agent@unkin.net>
main.unkin.net is the test mail domain: it receives into the existing unkin.net mailboxes, and its outbound mail is DKIM-signed as d=unkin.net, which aligns under relaxed DMARC.
- relay main.unkin.net on the smarthost and route it to Stalwart over LMTP
- add main.unkin.net as a domain alias of unkin.net in Stalwart
Reviewed-on: #550
Co-authored-by: unkin-agent <unkin-agent@unkin.net>
Co-committed-by: unkin-agent <unkin-agent@unkin.net>
Stalwart only files mail into Junk natively when its own spam filter marks it, so rspamd-tagged mail reached Junk only for accounts with a Sieve script, and first boot loads upstream DNSBLs, HTTP lists and URL lookups.
- enable the spam filter with one header rule scoring `X-Spam: Yes` above the spam threshold, covering every account including newly provisioned ones
- remove the upstream spam rules, tags, DNSBL servers, HTTP lists and lookup keys
- disable the classifier model and Pyzor
Reviewed-on: #544
Co-authored-by: unkin-agent <unkin-agent@unkin.net>
Co-committed-by: unkin-agent <unkin-agent@unkin.net>
The mail edge VMs in the BinaryLane DMZ VPCs query the internal resolvers over the VPN, but the resolver match-clients ACLs do not include their ranges.
- add 198.18.30.0/24 (syd) and 198.18.31.0/24 (mel) to `acl-dmz`
Reviewed-on: #545
Co-authored-by: unkin-agent <unkin-agent@unkin.net>
Co-committed-by: unkin-agent <unkin-agent@unkin.net>
The stalwart-apply PostSync Job fails with "Read-only file system": stalwart-cli caches the server schema under $HOME/.cache, which sits on the read-only root. The plan never applies, so Stalwart runs without its certificate, listeners or stdout tracer.
- mount a /tmp emptyDir in both Job containers
- set HOME=/tmp for the cli and kubectl (discovery cache)
Reviewed-on: #549
Co-authored-by: unkin-agent <unkin-agent@unkin.net>
Co-committed-by: unkin-agent <unkin-agent@unkin.net>
Browsers coalesce HTTP/2 connections across *.unkin.net hosts sharing the traefik-external IP. A request for a haproxy-fronted host (e.g. git.unkin.net) on a grafana connection skips SNI passthrough and hits Traefik with no HTTP router, returning 404.
- replace the TLS passthrough listener with an HTTPS listener terminating the three LE wildcards
- replace the haproxy TLSRoute with an HTTPRoute for the same hosts
- add a BackendTLSPolicy re-encrypting to haproxy:443
Reviewed-on: #547
Co-authored-by: unkin-agent <unkin-agent@unkin.net>
Co-committed-by: unkin-agent <unkin-agent@unkin.net>
Stalwart is the mailbox server for the mail migration and runs multi-node from the start, so it needs a coordinator and a shared in-memory store.
- run Stalwart as a 3-replica StatefulSet with a headless Service, topology spread and a PDB
- add the `mail-valkey` ValkeyCluster as in-memory store and coordinator
- keep data in CNPG Postgres and blobs in cephrgw S3
- converge settings from plan.ndjson in a PostSync Job, then roll the StatefulSet
- add a global `spam-to-junk` Sieve script filing rspamd-tagged mail into Junk and stopping
- exempt LMTP from the inbound throttles, as all inbound mail comes from the smarthost
- label pods as smarthost clients and move the client LoadBalancer to 198.18.200.18
Reviewed-on: #539
Co-authored-by: unkin-agent <unkin-agent@unkin.net>
Co-committed-by: unkin-agent <unkin-agent@unkin.net>
DNSBLs such as Spamhaus refuse queries that arrive via public resolvers, and forwarding everything to 8.8.8.8/1.1.1.1 leaves the estate dependent on them. The lab resolvers now do full recursion themselves (DNSSEC-validated via the operator default `dnssec-validation auto` and BIND built-in root hints).
- drop the global forwarders from the bind-resolvers BindCluster
- keep the per-zone forwarders for unkin.net, consul, k8s and reverse zones unchanged
Reviewed-on: #546
Co-authored-by: unkin-agent <unkin-agent@unkin.net>
Co-committed-by: unkin-agent <unkin-agent@unkin.net>