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:
Lancelot 2026-11-27 01:20:56 -05:00
commit aec63c4d56
18 changed files with 104 additions and 98 deletions

View file

@ -134,13 +134,13 @@ def ns_variable():
# Only the three runner Deployments' pods. `forgejo-runner-.*` also matches the
# `forgejo-runner-prune-*` CronJob pods, which are Completed and permanently
# "not Ready" — that turned a 0 into a 3 on the not-Ready stat.
RUN = 'namespace="forgejo-runners",pod=~"forgejo-runner-(amd64|arm64|deploy-arm64)-.*"'
RUN = 'namespace="ci-runners",pod=~"forgejo-runner-(amd64|arm64|deploy-arm64)-.*"'
SIRIUSSEC_FS = 'instance="10.10.0.2:9100",mountpoint="/"'
RPI_FS = 'instance="10.10.0.1:9100",mountpoint="/"'
runners = [
row("Runners & queue", 0),
stat("Runner pods Ready", [target('sum(kube_deployment_status_replicas_ready{namespace="forgejo-runners",deployment=~"forgejo-runner-.*"}) or vector(0)')],
stat("Runner pods Ready", [target('sum(kube_deployment_status_replicas_ready{namespace="ci-runners",deployment=~"forgejo-runner-.*"}) or vector(0)')],
{"h": 5, "w": 4, "x": 0, "y": 1}, desc="replicas_ready summed across the three runner Deployments. Expected 3.",
thresholds=[{"color": "red", "value": None}, {"color": "yellow", "value": 2}, {"color": "green", "value": 3}]),
stat("Runner pods not Ready", [target('sum(kube_pod_status_ready{%s,condition="false"} == 1) or vector(0)' % RUN)],
@ -192,7 +192,7 @@ runners = [
ts("Runner pod network I/O", [target('sum by (pod) (rate(container_network_receive_bytes_total{%s}[5m]))' % RUN, "{{pod}} in"),
target('sum by (pod) (rate(container_network_transmit_bytes_total{%s}[5m]))' % RUN, "{{pod}} out", ref="B")],
{"h": 8, "w": 8, "x": 0, "y": 25}, unit="Bps", desc="Image pulls and artifact traffic through the pod interface."),
stat("dind PVC nominal size", [target('max(kube_persistentvolumeclaim_resource_requests_storage_bytes{namespace="forgejo-runners",persistentvolumeclaim="forgejo-runner-amd64"})')],
stat("dind PVC nominal size", [target('max(kube_persistentvolumeclaim_resource_requests_storage_bytes{namespace="ci-runners",persistentvolumeclaim="forgejo-runner-amd64"})')],
{"h": 8, "w": 4, "x": 8, "y": 25}, unit="bytes",
desc="Requested size of the forgejo-runner-amd64 PVC (docker data-root + named CI volumes). This is the ceiling, not the usage — see the note on this row."),
stat("siriussec root fs used", [target('100 * (1 - node_filesystem_avail_bytes{%s} / node_filesystem_size_bytes{%s})' % (SIRIUSSEC_FS, SIRIUSSEC_FS))],

View file

@ -87,7 +87,7 @@ data:
"type": "prometheus",
"uid": "prometheus"
},
"expr": "sum(kube_deployment_status_replicas_ready{namespace=\"forgejo-runners\",deployment=~\"forgejo-runner-.*\"}) or vector(0)",
"expr": "sum(kube_deployment_status_replicas_ready{namespace=\"ci-runners\",deployment=~\"forgejo-runner-.*\"}) or vector(0)",
"refId": "A",
"editorMode": "code",
"range": true,
@ -155,7 +155,7 @@ data:
"type": "prometheus",
"uid": "prometheus"
},
"expr": "sum(kube_pod_status_ready{namespace=\"forgejo-runners\",pod=~\"forgejo-runner-(amd64|arm64|deploy-arm64)-.*\",condition=\"false\"} == 1) or vector(0)",
"expr": "sum(kube_pod_status_ready{namespace=\"ci-runners\",pod=~\"forgejo-runner-(amd64|arm64|deploy-arm64)-.*\",condition=\"false\"} == 1) or vector(0)",
"refId": "A",
"editorMode": "code",
"range": true,
@ -692,7 +692,7 @@ data:
"type": "prometheus",
"uid": "prometheus"
},
"expr": "sum by (pod, container) (increase(kube_pod_container_status_restarts_total{namespace=\"forgejo-runners\",pod=~\"forgejo-runner-(amd64|arm64|deploy-arm64)-.*\"}[24h]))",
"expr": "sum by (pod, container) (increase(kube_pod_container_status_restarts_total{namespace=\"ci-runners\",pod=~\"forgejo-runner-(amd64|arm64|deploy-arm64)-.*\"}[24h]))",
"refId": "A",
"editorMode": "code",
"range": true,
@ -749,7 +749,7 @@ data:
"type": "prometheus",
"uid": "prometheus"
},
"expr": "sum by (pod) (rate(container_cpu_usage_seconds_total{namespace=\"forgejo-runners\",pod=~\"forgejo-runner-(amd64|arm64|deploy-arm64)-.*\",container!=\"\"}[5m]))",
"expr": "sum by (pod) (rate(container_cpu_usage_seconds_total{namespace=\"ci-runners\",pod=~\"forgejo-runner-(amd64|arm64|deploy-arm64)-.*\",container!=\"\"}[5m]))",
"refId": "A",
"editorMode": "code",
"range": true,
@ -806,7 +806,7 @@ data:
"type": "prometheus",
"uid": "prometheus"
},
"expr": "sum by (pod) (container_memory_working_set_bytes{namespace=\"forgejo-runners\",pod=~\"forgejo-runner-(amd64|arm64|deploy-arm64)-.*\",container!=\"\"})",
"expr": "sum by (pod) (container_memory_working_set_bytes{namespace=\"ci-runners\",pod=~\"forgejo-runner-(amd64|arm64|deploy-arm64)-.*\",container!=\"\"})",
"refId": "A",
"editorMode": "code",
"range": true,
@ -876,7 +876,7 @@ data:
"type": "prometheus",
"uid": "prometheus"
},
"expr": "sum by (pod) (rate(container_network_receive_bytes_total{namespace=\"forgejo-runners\",pod=~\"forgejo-runner-(amd64|arm64|deploy-arm64)-.*\"}[5m]))",
"expr": "sum by (pod) (rate(container_network_receive_bytes_total{namespace=\"ci-runners\",pod=~\"forgejo-runner-(amd64|arm64|deploy-arm64)-.*\"}[5m]))",
"refId": "A",
"editorMode": "code",
"range": true,
@ -888,7 +888,7 @@ data:
"type": "prometheus",
"uid": "prometheus"
},
"expr": "sum by (pod) (rate(container_network_transmit_bytes_total{namespace=\"forgejo-runners\",pod=~\"forgejo-runner-(amd64|arm64|deploy-arm64)-.*\"}[5m]))",
"expr": "sum by (pod) (rate(container_network_transmit_bytes_total{namespace=\"ci-runners\",pod=~\"forgejo-runner-(amd64|arm64|deploy-arm64)-.*\"}[5m]))",
"refId": "B",
"editorMode": "code",
"range": true,
@ -945,7 +945,7 @@ data:
"type": "prometheus",
"uid": "prometheus"
},
"expr": "max(kube_persistentvolumeclaim_resource_requests_storage_bytes{namespace=\"forgejo-runners\",persistentvolumeclaim=\"forgejo-runner-amd64\"})",
"expr": "max(kube_persistentvolumeclaim_resource_requests_storage_bytes{namespace=\"ci-runners\",persistentvolumeclaim=\"forgejo-runner-amd64\"})",
"refId": "A",
"editorMode": "code",
"range": true,