ci(runners): name the CI capsule ci-runners and mark it privileged in warn/audit too
Renames the namespace introduced in #72 (`forgejo-runners` -> `ci-runners`) per the orchestrator decision on card t_2bbe34a8, and sets the capsule's warn/audit levels to `privileged` alongside `enforce: privileged`: everything in it is allowed by design, so restricted-level warnings on every pod restart would be noise, and the intent is explicit in Git rather than implied. Storage is the same three PVs, rebound again by name (Retain + cleared claimRef), so the runner registration uuids, dind image sets and action caches survive: verified before/after (uuids 91124ee3/4e07c1e9/a41aad73, image counts 19/2/31, canary files intact). Monitoring selectors and docs follow the new namespace; the Grafana dashboard keeps its `forgejo-runners` uid.
This commit is contained in:
parent
77041b35ac
commit
aec63c4d56
18 changed files with 104 additions and 98 deletions
|
|
@ -355,9 +355,9 @@ Producer: the **CNPG-I Barman Cloud plugin** (`cnpg-system/barman-cloud`,
|
|||
| 4 | flux-system | `notification-controller-7cd6d4994b-drh8x` | siriussec | 10.244.0.125 | Flux alerts/webhooks | internal |
|
||||
| 5 | flux-system | `source-controller-56549698b5-2lvmc` | siriussec | 10.244.0.44 | Flux git artifact fetcher | internal |
|
||||
| 6 | forgejo | `forgejo-67847d596c-jpb7x` | siriussec | 10.244.0.197 | Forgejo **16.0.5** git/CI/registry UI | **public** `forgejo.siriusdevops.com` |
|
||||
| 7 | forgejo-runners | `forgejo-runner-amd64-…` | siriussec | 10.244.0.x | Actions runner (privileged dind sidecar), labels `docker-amd64`, `amd64` | internal |
|
||||
| 8 | forgejo-runners | `forgejo-runner-arm64-…` | rpi | 10.244.1.x | Actions runner (privileged dind sidecar), labels `docker-arm64`, `arm64`, `docker` | internal |
|
||||
| 9 | forgejo-runners | `forgejo-runner-deploy-arm64-…` | rpi | 10.244.1.x | Actions runner (privileged dind sidecar), label **`deploy-arm64` only** (site deploys) | internal |
|
||||
| 7 | ci-runners | `forgejo-runner-amd64-…` | siriussec | 10.244.0.x | Actions runner (privileged dind sidecar), labels `docker-amd64`, `amd64` | internal |
|
||||
| 8 | ci-runners | `forgejo-runner-arm64-…` | rpi | 10.244.1.x | Actions runner (privileged dind sidecar), labels `docker-arm64`, `arm64`, `docker` | internal |
|
||||
| 9 | ci-runners | `forgejo-runner-deploy-arm64-…` | rpi | 10.244.1.x | Actions runner (privileged dind sidecar), label **`deploy-arm64` only** (site deploys) | internal |
|
||||
| 10 | forgejo | `pg-1` | siriussec | 10.244.0.159 | CNPG PostgreSQL for Forgejo (1 instance) | internal |
|
||||
| 11 | kube-system | `cilium-cz7w6` | siriussec | 10.10.0.2 (host-net) | Cilium agent v1.20.1 | internal |
|
||||
| 12 | kube-system | `cilium-dswfb` | rpi | 10.10.0.1 (host-net) | Cilium agent v1.20.1 | internal |
|
||||
|
|
@ -424,11 +424,11 @@ Label discipline that must not be broken:
|
|||
|
||||
Workflow labels actually present in the local checkouts *(live grep of `.forgejo/workflows`)*: `docker` (×8) and `docker-amd64` (×3) in `onionwire`; `deploy-arm64`, `docker-amd64` in `sirius-growth`; `docker-amd64` in `siriusdevops-contact`.
|
||||
|
||||
### 6.5 Nightly disk reclamation (`forgejo-runners/forgejo-runner-prune`)
|
||||
### 6.5 Nightly disk reclamation (`ci-runners/forgejo-runner-prune`)
|
||||
|
||||
`apps/base/forgejo/prune-cronjob.yaml`, `17 4 * * *` **UTC** (the repo's one CronJob timezone convention), `concurrencyPolicy: Forbid`, `startingDeadlineSeconds: 1800`, `backoffLimit: 1`, `activeDeadlineSeconds: 3600`.
|
||||
|
||||
**Two containers, because there are two kinds of daemon.** `host-daemon` (`docker:27-cli`) mounts the Pi's `/var/run/docker.sock`; `dind-daemons` (`alpine/k8s:1.36.4`) discovers in-cluster dind daemons — pods with label `app=forgejo-runner` **that have a container named `dind`** — and runs the same prune logic inside each over the exec API. The ServiceAccount `forgejo-prune` has only `pods get,list` and `pods/exec create` in namespace `forgejo-runners`. No pod names are in the manifest, so the two arm64 dind daemons from the arm64 migration are picked up the first night they exist (proved by creating an unrelated `app=forgejo-runner` dind pod: the job reported `found=2 pruned=2`).
|
||||
**Two containers, because there are two kinds of daemon.** `host-daemon` (`docker:27-cli`) mounts the Pi's `/var/run/docker.sock`; `dind-daemons` (`alpine/k8s:1.36.4`) discovers in-cluster dind daemons — pods with label `app=forgejo-runner` **that have a container named `dind`** — and runs the same prune logic inside each over the exec API. The ServiceAccount `forgejo-prune` has only `pods get,list` and `pods/exec create` in namespace `ci-runners`. No pod names are in the manifest, so the two arm64 dind daemons from the arm64 migration are picked up the first night they exist (proved by creating an unrelated `app=forgejo-runner` dind pod: the job reported `found=2 pruned=2`).
|
||||
|
||||
**Retention.** Exited containers > 48 h, unused **Pi-host** images > 168 h (a week of rollback for the sites). Build cache is capped at **20 GB** on the Pi host and **4 GB** per dind daemon; above the cap the script walks `--filter until=` down from 72 h to 0 s and stops as soon as the cache is under the cap, so the newest layers survive and a cold cache is the last resort. In-cluster images are **dangling-only** pruned: an `until` filter on a *pulled* image compares the upstream build date, so it would delete `node:20-bullseye` / `rust:*-bookworm` every night and make every job cold.
|
||||
|
||||
|
|
@ -439,9 +439,9 @@ Workflow labels actually present in the local checkouts *(live grep of `.forgejo
|
|||
Force a run (safe any time; it self-skips when busy):
|
||||
|
||||
```bash
|
||||
kubectl -n forgejo-runners create job --from=cronjob/forgejo-runner-prune prune-manual-$(date +%s)
|
||||
kubectl -n forgejo-runners logs job/prune-manual-<ts> -c host-daemon # Pi daemon
|
||||
kubectl -n forgejo-runners logs job/prune-manual-<ts> -c dind-daemons # every dind daemon
|
||||
kubectl -n ci-runners create job --from=cronjob/forgejo-runner-prune prune-manual-$(date +%s)
|
||||
kubectl -n ci-runners logs job/prune-manual-<ts> -c host-daemon # Pi daemon
|
||||
kubectl -n ci-runners logs job/prune-manual-<ts> -c dind-daemons # every dind daemon
|
||||
```
|
||||
|
||||
**Two premises worth writing down, because the code depends on them** (both verified 2026-10-27):
|
||||
|
|
@ -931,8 +931,8 @@ All times 2026-10-26 UTC. `kubeconfig` on the Legion admin laptop → `https://1
|
|||
| 9 | `kubectl -n kube-system get ds,deploy` / image tags | cilium `v1.20.1`, envoy `v1.37.5` |
|
||||
| 10 | `kubectl -n kube-system exec ds/cilium -- cilium-dbg status --brief` | `OK` |
|
||||
| 11 | `kubectl top nodes` | `error: Metrics API not available` → no metrics-server |
|
||||
| 12 | `kubectl -n forgejo-runners get deploy -o json` | 3 runner Deployments + nodeSelectors; pod/container securityContext as documented |
|
||||
| 13 | `kubectl -n forgejo-runners get cm forgejo-runner-config -o jsonpath` | three TOMLs: `amd64.toml`, `arm64.toml`, `deploy-arm64.toml`, all `capacity: 1` |
|
||||
| 12 | `kubectl -n ci-runners get deploy -o json` | 3 runner Deployments + nodeSelectors; pod/container securityContext as documented |
|
||||
| 13 | `kubectl -n ci-runners get cm forgejo-runner-config -o jsonpath` | three TOMLs: `amd64.toml`, `arm64.toml`, `deploy-arm64.toml`, all `capacity: 1` |
|
||||
| 14 | `kubectl -n forgejo exec deploy/forgejo -- forgejo --version` | `16.0.5` |
|
||||
| 15 | rpi: `sudo wg show` | `wg0` 3 peers (handshakes 1 min / 48 min / 6 d); `wg-remote` 1 peer, 35 s |
|
||||
| 16 | rpi: `sudo wg show wg0 dump \| wc -l` | `4` |
|
||||
|
|
|
|||
Loading…
Reference in a new issue