monitoring: replace the dead kubelet_volume_stats alerts with runner-scoped disk rules
kubelet_volume_stats_* was an ALPHA metric set served from kubelet's /metrics/volumes endpoint; that endpoint returns 404 on every node of this cluster (kubelet v1.36.4 — upstream loss in 1.34, kubernetes#133847), and /metrics carries no volume-stats series. RunnerDindPvcHighWatermark and RunnerDindPvcCritical therefore could never fire while showing as healthy. Per-PVC bytes are not measurable here and no scrape config can change that, so the pair is replaced by RunnerDindDiskHighWatermark (80%) and RunnerDindDiskCritical (90%): root-filesystem usage on nodes that actually run a forgejo-runner pod, which is the filesystem holding the dind data-root under /opt/local-path-provisioner. New arm64 dind PVCs are covered as soon as their runner is scheduled; nodes without runners (linode) do not duplicate the generic disk-capacity group. Also corrects the cause in docs, the dashboard notes and the prune CronJob comment (it is not a hostPath quirk, the endpoint is gone).
This commit is contained in:
parent
131b9bc7c9
commit
e572f84b0b
8 changed files with 145 additions and 80 deletions
|
|
@ -414,9 +414,9 @@ kubectl -n forgejo logs job/prune-manual-<ts> -c dind-daemons # every dind da
|
|||
**Two premises worth writing down, because the code depends on them** (both verified 2026-10-27):
|
||||
|
||||
- The build-cache *capacity* flags are a no-op on this buildx (0.20.1). `--keep-storage`, `--max-storage` (rejected: unknown flag) and `--max-used-space` all report `Total: 0B` with a cache over the cap — a 21.44 GB cache with `--max-used-space 20GB`, and a 541 MB cache with `--max-used-space 100MB`. `--filter until=` *does* reclaim (541 MB → 0 with `until=0s`), which is why the cap is enforced by walking age windows.
|
||||
- `kubelet_volume_stats_used_bytes` / `_capacity_bytes` **do not exist on this cluster**. kubelet v1.36.4 exposes `kubelet_volume_metric_collection_duration_seconds` but no volume stats for any node (`kubectl get --raw /api/v1/nodes/<node>/proxy/metrics | grep volume_stats` is empty, zero series in Prometheus). The per-PVC rules in `monitoring/controllers/home/prune-alerts.yaml` are therefore correct-but-inert; live coverage is the node-filesystem alert, because every local-path PV lives on siriussec's `/`.
|
||||
- **Per-PVC usage is not measurable on this cluster, and no alert pretends otherwise.** `kubelet_volume_stats_*` was an ALPHA metric set served from kubelet's `/metrics/volumes` endpoint; on kubelet v1.36.4 that endpoint returns **404 on all three nodes** (`/metrics`, `/metrics/probes`, `/metrics/cadvisor`, `/metrics/resource` all return 200) and `/metrics` carries no volume-stats series — the upstream loss in kubelet 1.34 (kubernetes/kubernetes#133847, fix #133890), not a hostPath quirk. There is therefore no scrape config that can produce those series; re-deriving them would need a new exporter parsing kubelet's `/stats/summary` JSON (new Deployment + `nodes/stats` RBAC). The old `RunnerDindPvcHighWatermark` / `RunnerDindPvcCritical` rules were deleted for selecting a metric with no producer, and replaced by runner-scoped filesystem rules — see below.
|
||||
|
||||
**Alerts** (`PrometheusRule monitoring/forgejo-prune`, label `release: kube-prometheus-stack`): `ForgejoPruneCronJobStale` (last success > 26 h, or the series absent), `ForgejoPruneJobFailed` (`kube_job_status_failed` for `forgejo-runner-prune-*` > 0 — `kube_job_failed` no longer exists), `NodeFilesystemFillingUp` / `NodeFilesystemCritical` (root fs > 85 % / > 92 % per node, joined to the hostname via `node_uname_info`), plus `RunnerDindPvcHighWatermark` / `RunnerDindPvcCritical` (85 % / 95 %, inert as above). Alertmanager is disabled in this stack, so they surface in Prometheus → Alerts and Grafana → Alerting, not as pages.
|
||||
**Alerts** (`PrometheusRule monitoring/forgejo-prune`, label `release: kube-prometheus-stack`): `ForgejoPruneCronJobStale` (last success > 26 h, or the series absent), `ForgejoPruneJobFailed` (`kube_job_status_failed` for `forgejo-runner-prune-*` > 0 — `kube_job_failed` no longer exists), `NodeFilesystemFillingUp` / `NodeFilesystemCritical` (root fs > 85 % / > 92 % per node, joined to the hostname via `node_uname_info`), plus the node-filesystem guards that replaced them: `RunnerDindDiskHighWatermark` / `RunnerDindDiskCritical` (root fs > 80 % / > 90 % on nodes that run a `forgejo-runner` pod — joined node → `node_uname_info.nodename` → `kube_pod_info.node`, rpi excluded), and `RpiDindDataRootFillingUp` (group `dind-disk-cap`, rpi root fs > 70 %, because it carries 240 GiB of dind PVCs on a 917 G disk). The dind data-root is a plain directory under `/opt/local-path-provisioner` on that filesystem, so filesystem fill is the only honest per-runner signal. Alertmanager is disabled in this stack, so they surface in Prometheus → Alerts and Grafana → Alerting, not as pages.
|
||||
|
||||
---
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue