The 2026-11-25..12-04 outage was invisible: deploy/osint-news-summarizer
stayed Running with restarts 0 and INFO batch lines while article_summaries
froze for nine days, and the scraper kept articles fresh (61.5k rows, newest
within minutes). The app has no /metrics endpoint, so add a small read-only
Postgres exporter and two Prometheus rules.
- osint-analyst-exporter (ns osint): stdlib HTTP server on :9187 serving
osint_analyst_last_success_timestamp_seconds (max article_summaries.
batch_timestamp), osint_ingest_last_article_timestamp_seconds (max
articles.timestamp) and osint_analyst_exporter_up. Runs the pinned
summarizer image (python3 + psycopg2), non-root, read-only rootfs,
clusterIP Service + ServiceMonitor (release=kube-prometheus-stack).
- NetworkPolicy: one port-scoped ingress rule, monitoring -> :9187. Nothing
else in monitoring can reach osint.
- monitoring/controllers/home/osint-analyst.yaml: OsintAnalystStale
(>1h, 30m, warning, with an absent() arm so a dead exporter cannot read as
healthy) and OsintIngestAliveButNoBrief (articles <2h old while summaries
>2h old, 10m, warning). Both route through the default Telegram receiver.
meituan/longcat-2.5:free was retired from the Nous Portal; every map/reduce
call returned 404, chat() swallowed it, and the analyst produced no briefs
after 2025-11-25 (last daily_recap 11-23). The :free ids now demand a user
tag and answer 503 anyway, so pin deepseek/deepseek-v4.1-flash-1017 ($0.03/
$0.12 per Mtok, json_object verified) instead.
The lab.html rewrite merged as 3ac9870aa7637cffb789edcc16b9512d7567886d
(sirius/siriusdevops PR #29); deploy-site run 68 built
siriusdevops-site:3ac9870aa7637cffb789edcc16b9512d7567886d green on that sha.
CI has no cluster credentials, so this pin is what rolls the site Deployment.
deployment-api.yaml is untouched: the API code did not change.
The CNPG operator dials each instance's HTTPS status endpoint
(https://<podIP>:8000/pg/status) to derive the system ID and drive
switchover. The tenant isolation added in t_fed52919 opened only
gateway/node/health entities, same-namespace pods and monitoring:9187,
so cnpg-system was denied: forgejo/pg and sirius-growth/portal sat at
Ready=False / ConsistentSystemID=False ('Instance Status Extraction
Error: HTTP communication issue') while their pods served traffic and
automated failover was effectively disabled.
Add one ingress rule to each CNP, scoped to the operator pod label
(app.kubernetes.io/name=cloudnative-pg in cnpg-system) and to TCP 8000
only. Not world, not the whole cluster, not 5432.
The namespace never pulled from the in-cluster registry before (its job used
alpine/k8s from Docker Hub), so the new image reference had no credential and
the pod sat in ErrImagePull. Same SOPS-encrypted dockerconfigjson as the other
namespaces; deviating only in metadata.namespace.
monitoring/grafana-backup, forgejo/cluster-backup and sirius-growth/leadgen-backup
all ran `apk add --no-cache rsync openssh-client` at container start. Every night
that dialled dl-cdn.alpinelinux.org (Fastly anycast 151.101.x.132:443), which is
what `egress-new-dst` kept reporting, and made the backups depend on the public
internet at 03:00 UTC.
- image: forgejo.siriusdevops.com/sirius/backup-tools, built in CI from
python:3.12-alpine (pinned by digest) + rsync + openssh-client + bash +
kubectl v1.36.4 (release sha256 verified at build). Pinned by digest in all
three CronJobs, no apk in any backup path.
- egress: CiliumNetworkPolicy per backup pod — cluster DNS and 10.10.0.5:22 for
all three, plus kube-apiserver 6443/443 for cluster-backup only, with an
explicit deny for `world` (Cilium unions namespace policies, so the allow list
alone would not restrict a pod inside `forgejo`/`sirius-growth`).
- monitoring gains the registry pull secret it never needed before; the job now
keeps imagePullSecrets: forgejo-pull (SOPS-encrypted in git).
Schedules, retention, destination paths, entrypoints and RBAC are unchanged.
Forgejo's /v2/token answers 403 to the scope set buildx imagetools uses
(measured on this registry), while push and kubelet pull work. The metadata
file is the authoritative digest of the manifest the registry just accepted.
The three nightly backups (grafana-backup, cluster-backup, leadgen-backup)
installed rsync + openssh-client with apk at container start, so every run
depended on the Alpine CDN (Fastly anycast 151.101.x.132:443) and moved the
egress-new-dst alert whenever that anycast address rotated.
This adds the build only; the CronJob pins land in the next commit. Base image
python:3.12-alpine pinned by digest, kubectl v1.36.4 from dl.k8s.io with its
release sha256, amd64 only (all three jobs are nodeSelector'd to siriussec).
Link B (rpi wg-remote <-> linode wg0) depends on a permanent UPnP mapping
UDP 9999 -> 192.168.1.125:9999 for its inbound path, and the 15-minute
rosenpass-upnp.timer only logged to the journal when it could not re-assert
it. Two gaps closed:
* RosenpassPskRotationStalled gains absent(rosenpass_psk_rotation_age_seconds
{node="rpi", interface="wg-remote"}). Without it a dead metrics timer or
script on the Pi silently dropped the Link B series while the rule kept
reading healthy. No siriussec/wg-remote arm: that interface does not exist
there.
* rosenpass-upnp.sh now stamps its result to /run/rosenpass-upnp.present (1/0)
and rosenpass-metrics.sh reads that file into rosenpass_upnp_mapping_present
{node="rpi"} plus rosenpass_upnp_last_check_timestamp_seconds. The 60 s
metrics timer never calls upnpc (that would poll the IGD 1440x/day); a host
without the state file (siriussec) emits neither series. New
RosenpassUpnpMappingLost alert fires on value 0, on a state file older than
30 minutes (stopped timer / hung IGD, so a stale 1 cannot read healthy), or
on a missing series.
Link B (rpi wg-remote 10.20.0.2 <-> linode wg0 10.20.0.1) is now under
Rosenpass too. The pieces that only existed on the hosts are committed
here with an install/diagnosis write-up, because all three are runtime
state someone will have to rebuild:
- rosenpass-upnp.{sh,service,timer} - re-assert the permanent UPnP mapping
UDP 9999 -> 192.168.1.125 every 15 min (the router has no admin panel,
and a dropped mapping is silent).
- linkb-rollback-{rpi,linode}.sh - the self-cancelling watchdogs; this link
carries the only SSH path to the linode, so the rollback is local and
staged on both ends before the far unit starts.
- linkb-verify.sh - hashes each end's PSK and compares them without
printing key material.
Endpoint strategy recorded: the Pi's public address is residential DHCP
but provably static (IGD uptime since 2026-09-10, ~83 days on the
configured 137.118.156.124), so the linode config pins it and a moved
address is caught by the per-interface rotation-age series rather than by
a sync timer.
rosenpass-metrics.sh hashed wg0 only, so Link B (rpi wg-remote <->
linode wg0) could stall - the Pi's residential public address moving, or
the UPnP mapping for UDP 9999 being dropped - while every Link A series
stayed healthy. Iterate over an interface list, keep one state file per
interface, and emit age/last-change per interface. wg0's series keep the
same names and labels, so existing dashboards and the Link A alerts are
unchanged; RosenpassPskRotationStalled already keys on
(node, interface) and therefore starts covering wg-remote with no rule
change. A host without the interface (siriussec) simply skips it.
Rosenpass rotates the Link A preshared key (rpi wg0 10.10.0.1 <->
siriussec wg0 10.10.0.2) about every two minutes, but WireGuard keeps
using the last key it received: a dead or wedged exchange leaves the
tunnel up and silently non-post-quantum, with no alerting signal.
node-exporter here is distroless without the textfile collector (and
without the dbus plumbing --collector.systemd needs), so observe the
host directly:
- infrastructure/networking/rosenpass/: POSIX sh script run by a 60 s
systemd timer on rpi and siriussec that writes
/var/lib/node-exporter/textfile/rosenpass.prom. It exports
rosenpass_unit_active, rosenpass_psk_rotation_age_seconds and
rosenpass_psk_rotation_last_change_timestamp_seconds; the PSK listing
is only ever sha256'd, never logged or persisted.
- values.yaml: enable --collector.textfile.directory and mount the
hostPath (DirectoryOrCreate, so linode's node-exporter still starts).
extraArgs replaces the subchart defaults, so the two filesystem
exclusions are repeated verbatim.
- rosenpass.yaml: RosenpassDown (5 m) and RosenpassPskRotationStalled
(age > 900 s, 10 m), both warning, both with absent() arms so a
missing series alerts instead of reading as healthy.
Host units are installed out of band (see the directory README); the
GitOps side needs a merge before Prometheus loads the rules.
REQUIRE_SIGNIN_VIEW was the F11 mitigation for ghost-user /v2/token grants,
but it also forced every public repo to a login page. Move the guard to a
Cloudflare custom rule that blocks /v2/token unless the request carries
Basic auth, and turn public browsing back on.
HubbleFlowWindowIncomplete was paging on all three nodes with
perf_event_ring_buffer and observer_events_queue at 0: the gate recorder was
increase(hubble_lost_events_total{source="hubble_ring_buffer"}[30m]), and that
counter also counts *reads* that fall outside the ring's retained window
(cilium#46584, still open in 1.20.1). Two Hubble UI/status reads an hour
(18:27, 18:35, same minutes on every node) moved it +1 each, which kept the
recorder at ~2.01 and the alert true forever. HubbleFlowLossMaterial used the
same recorder, so a handful of reads could also read as 0.03% "loss" on the
quiet Pi node.
- hubble:lost_events_increase_30m is now real loss only, per (node, source):
increase(hubble_lost_events_total{source=~"perf_event_ring_buffer|observer_events_queue"}[30m]).
HubbleFlowWindowIncomplete and HubbleFlowLossMaterial read it with unchanged
thresholds, so they fire only when something was actually dropped.
- hubble_ring_buffer gets hubble:ring_buffer_read_rate_15m and the new
HubbleRingBufferReadChurn warning at > 0.05 events/s (15m rate, 10m for).
Current churn is ~0.001/s; the F10 health-probe storm was ~0.2/s.
- Both summaries name the source, so a read is never reported as a dropped
flow. HubbleFlowSensorMissing unchanged.
No change to hubble.eventBufferCapacity and no Cilium roll. Docs
(docs/hubble-event-loss.md §"The gate") updated with the split and the
measured reason.
Task: t_397d180a
First real runs: deploy-site on the Kata runner 48s (runc baseline 22s/31s),
siriusdevops deploy on the untouched amd64 runner 49s vs 49s. Records the three
measured blockers found converting the runner (virtiofs unix socket needs tmpfs,
domain-threaded guest cgroups forbid --memory on job containers, binfmt is
per-VM) and the Recreate/rollout orphan-run trap.
Audit F3 / A5-1. Every pod in customer1, osint, sirius-growth, piedmont,
siriusdevops and forgejo was reachable from every other pod, from the API
server, from the internal WireGuard-only Gateway ports on 10.10.0.2 and from
the internet.
- each namespace: a stock NetworkPolicy 'default-deny' (podSelector {},
Ingress+Egress, no rules) plus a CiliumNetworkPolicy allow that names the
gateway/kubelet/health entities, same-namespace pods, cluster DNS and only
the egress each workload actually uses (world for Telegram/news/inference,
remote-node :3900 for Garage, :22 for the backup rsync, kube-apiserver :6443
where CNPG/kubectl needs it, none at all for customer1)
- siriusdevops: replaces the egress-only siriusdevops-site-egress CNP
- customer1: ResourceQuota + LimitRange sized from the declared 1-replica
shape (35Gi already bound, 2 CPU / 4Gi requests) - the sandbox stays parked
- docs/network-isolation.md: the model plus the five gotchas measured while
landing it (both-ends enforcement, kube-apiserver identity covering the
whole node IP, remote-node vs world for Garage, ingress vs host identity)
Kata's guest cgroup root is 'domain threaded' and only cpuset/cpu/pids are
delegated, so dockerd cannot apply --memory to a job container: every job died
at 'docker run' with
unable to apply cgroup configuration: cannot enter cgroupv2
"/sys/fs/cgroup/docker" with domain controllers -- it is in threaded mode
(run 1442, first attempt on the Kata runner). Drop --memory/--memory-swap from
deploy-arm64.toml only; the 2Gi dind limit sizes the microVM, so the blast
radius is unchanged. The runc runners keep their per-job limits.
A disk-backed emptyDir is a virtiofs share under Kata, and a unix socket on
virtiofs is visible across the pod but unconnectable: the runner crashlooped on
'cannot ping the docker daemon ... unix:///var/run/docker.sock' although ls -l
showed srw-rw---- root:1000 and the dind sidecar's own 'docker version' on the
same path worked. medium: Memory makes /var/run a tmpfs inside the guest, so the
socket is a real inode for both containers and the existing
'-v /var/run/docker.sock /var/run/docker.sock' job option keeps working.
Verified: the runner declared successfully and polls (deploy-arm64 runner).
The CI capsule cannot enforce PSA baseline: every nested dockerd needs
SYS_ADMIN+NET_ADMIN in the pod spec and baseline forbids exactly those, which
sysbox, gVisor and Kata all reproduce (measured on both arches, card
t_8aa4af50). What a runtime CAN change is what privileged:true means.
Stage 1, one runner: forgejo-runner-deploy-arm64 (rpi) gets
runtimeClassName: kata-qemu, so its privileged dind and job containers run
inside a QEMU/KVM microVM instead of on rpi's host namespaces. The amd64 and
shared arm64 runners stay on privileged dind under runc, untouched.
Kata-specific plumbing in the same Deployment:
- loop-backed ext4 data-root (16GiB image on the existing claim) because
overlayfs refuses virtiofs and Docker would silently fall back to vfs;
- binfmt_misc + tonistiigi/binfmt --install amd64 on every start, because the
guest kernel has no qemu handlers and deploy-site.yml cross-builds amd64;
- the runner waits for /var/run/dind-ready (touched after both are set up).
RuntimeClass kata-qemu is cluster-scoped; the containerd handler lives on rpi
only (/etc/containerd/conf.d/50-kata.toml, kata-static 4.4.0). Rollback is one
field. docs/pod-security.md records the measurement and states plainly that the
namespace stays enforce: privileged.
Observed 2026-11-27T07:02:56Z: 3.log 10,528,075 B -> 3.log.20261127-020256, 29.3 min after the
first access line (28.6 min projected). A plain *.log glob misses rotated files, so the verify and
parse commands use *.log*.
Live numbers from a 19.6-minute window after enabling F7: 641 B/line, 9.54
lines/s, 528 MB/day raw (274 MB/day at the 5-day average), 1.008 lines per
request. kubelet's default 10Mi x 5 gives 28.6 min per file / ~2.4 h total at
the measured rate (50 MiB hard cap = 0.023% of the 213.5 GiB root); Loki stores
the same traffic at 12.6x compression (42 MB/day, ~340 MB for 192 h), so the
kubelet default is kept.
Also records the wedge that made the first apply look inert: the operator's
gateway controller had failed to init during an earlier apiserver restart, so
GatewayClassConfig changes produced nothing until the operator was restarted.
The runner pod/PVC/Deployment targets on the forgejo-runners board belong to
namespace ci-runners (the CI capsule moved there so forgejo can enforce PSA
baseline), while the cnpg_actions_* queue/jobs targets belong to the forgejo
*database*. aec63c4 fixed the namespace by hand in eight places; this replaces
those literals with one CI_RUNNERS_NS constant fed into RUN, the replicas_ready
stat and the dind PVC stat, and documents the two-namespace split in
docs/monitoring-dashboards.md so the next move is a one-line change.
Regenerated with build.py: forgejo-runners.yaml is byte-identical to the
committed file (no behaviour change, no other board touched). Note the name is
CI_RUNNERS_NS, not RUNNER_NS - RUNNER_NS is already the Loki selector
constant in this script.
validate_panels.py against Prometheus: 55/55 targets OK, 0 empty. On this
board: Runner pods Ready=3 (1 series), restarts 6 series over the three pods,
CPU/mem/net 3 series each, dind PVC 20Gi.
Finding F7: cilium-envoy emitted no request-level record, so the netsec
design's application-layer rules had no input stream.
CiliumGatewayClassConfig kube-system/cilium binds spec.telemetry.accessLogs
(JSON, HTTP target) to the cilium GatewayClass via spec.parametersRef, so
Cilium renders an access log into every Gateway listener's HTTP connection
manager and writes one JSON line per request to the cilium-envoy container
stdout (/var/log/pods/kube-system_cilium-envoy-*/cilium-envoy/*.log).
Fields are an explicit allowlist: method, path, response code/flags, duration,
bytes, authority, CF-Connecting-IP (real client, since Envoy is hostNetwork
behind cloudflared), X-Forwarded-For, peer, User-Agent, CF-Ray, upstream host.
No bodies, no header dumps: Authorization/Cookie never reach disk. Application
log level stays info (no debug/trace).
The CNPG exporter answers the whole /metrics request with HTTP 500 when a
custom query emits two rows with the same series name + label set, which
also drops every pg_stat_*/cnpg_pg_* series (Prometheus target down).
action_runner held three rows named siriussec-amd64 (one live, two
soft-deleted tombstones from the runner renames), so
cnpg_actions_runners_last_online_seconds was collected twice and the
endpoint returned 500.
- WHERE r.deleted IS NULL -> ignore Forgejo's soft-deleted runner rows.
- GROUP BY r.name with max(last_online) -> the label is the name, so a
duplicate name can never produce a duplicate series again; reporting the
most recent poll per name is the intended semantic.
- label cnpg.io/reload -> the instance manager re-reads the queries on
change instead of needing a pod restart (or kubectl cnpg reload) before
a query fix takes effect.
The log store shipped in t_34ddaa83 but nothing could read it: the Loki datasource
ConfigMap was live and written into Grafana's provisioning volume, and Grafana still
listed only Prometheus + Alertmanager. Root cause was not the ConfigMap. The
datasource sidecar writes the file and then POSTs
/api/admin/provisioning/datasources/reload with monitoring/grafana-admin, which was
401-ing because Grafana's DB password had drifted from that Secret (the documented
"the Secret is only the seed" behaviour) — Grafana reads provisioning/datasources
only at startup, so the datasource never loaded.
- Reset the live admin password to the Secret's value (in-pod `grafana cli
admin reset-admin-password`, value read from the Secret and never printed), so
seed and DB match again and the sidecar's reload returns 200. Documented in
docs/grafana-persistence.md, including the sidecar consequence of drift.
- New generated dashboard `logs` (uid: logs) with the two queries worth having:
secret access over time by user from the apiserver audit stream, and pod errors
by namespace, plus the runner namespaces and a note panel on field names.
- The audit stream's names are the Alloy allowlist's, not the audit event's:
objectRef.resource arrives as the stream label `resource` and user.username as
the field `user`. `| json | objectRef_resource="secrets"` returns 0 rows
(measured); the panels use `resource="secrets"` in the selector + `| json` for
the user dimension. No pipeline, retention or filter change.
- Runner panels discover their namespace via a `runner_ns` variable
(.*(runner|forgejo).*) instead of pinning one name, so the t_2bbe34a8 move to
ci-runners needs no edit here.
- validate_panels.py now dispatches on the target's datasource and queries Loki
for `loki` panels (a logs panel must return rows, not just series).
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.
The three Actions runners (privileged dind sidecars) and the nightly prune
CronJob (hostPath /var/run/docker.sock) cannot live under PSA baseline, so
they move to their own namespace `forgejo-runners` with `enforce: privileged`
(plus warn/audit restricted). That lets `forgejo` — Forgejo, CNPG Postgres,
cluster-backup — enforce `baseline` instead of only warning.
The dind sidecars stay privileged: measured on these nodes, a non-privileged
pod cannot host a container runtime (cgroup fs is mounted ro; rootless dind
cannot mount procfs; procMount=Unmasked needs hostUsers=false where subuid
maps and /dev/net/tun are refused). See docs/pod-security.md.
- PVCs/PVs are reused, not recreated: the two static Retain PVs on rpi and the
dynamic local-path PV on siriussec were rebound by name, so runner.ini
(registration uuid), the dind data-root and the actions cache survive.
- prune CronJob + its SA/Role/RoleBinding/configmap move with the runners;
NAMESPACE and the Role scope follow.
- monitoring: runner/prune queries and runbooks now select forgejo-runners;
cnpg_actions_* panels keep namespace="forgejo" (that is the pg namespace).
- docs: pod-security.md rewritten for the two enforced namespaces.
Verified live: all three runners 2/2 Running in forgejo-runners with their
original registration uuids and image counts, forgejo rejects a privileged pod
at admission, and a real CI image build completes (see the card).
The collector wrote 150 MiB plaintext files into a directory capped at 960 MiB,
which bought only ~4-5 h of retention at the measured 4.5-6.2 GB/day
(3380-4280 kB/min) of filtered Hubble JSONL — the cap was sized for a forensic
window, not for hours.
Compress on rotate; no schema change, no filter change, no DS argument change:
* the file being appended stays plain `flows-<ts>-<n>.jsonl` (one file for a
reader to tail);
* on rotation the closed file is gzip'd to `.jsonl.gz` through a temp name +
atomic rename, in the background, so a reader never sees a partial archive and
the flow reader never stalls (stalling it makes the agent drop events);
* prune bounds the WHOLE directory at MAX_TOTAL_BYTES = 960 MiB — archives and
in-flight `.gz.tmp` included — deleting oldest first, and never reaps the live
file nor a file whose gzip is still running (that would discard the archive
and lose the entire file);
* MAX_FILES now bounds plain files only. Applying it to the archives is exactly
what would keep retention at a few hours.
Measured on this node's live data 2026-11-27: 18.53x ratio at gzip -9
(17.85x at -6), i.e. 960 MiB holds 72.6 h at the 6.16 GB/day burst sample,
92 h at 4.87 GB/day and ~100 h at the 4.48 GB/day 55-minute average.
Verified offline against a replaying fake `hubble` (rotation->archive parity,
gzip -t on every archive, atomicity, oldest-first prune, live-file and in-flight
protection) and inside the real cilium image under dash (23 rotations -> 23
valid archives, no loss).
The fix-data-perms init container guarded a chown -R behind a TOP-LEVEL owner
check (`stat -c %u /data/.cache`). /data/.cache was already 1000 while the git
pack files inside it were still root:root from the pre-uid-1000 runner, so the
guard skipped exactly the file that matters and every job on that runner died
in actions/checkout, before a single step:
open /data/.cache/act/actions-checkout@v4/.git/objects/pack/pack-ba0cccfe….pack:
permission denied
That is a 3 s red X with zero steps on a push (websites run 1430, card
t_29249bf0). chown the three trees the runner writes recursively instead
(cache/, .cache/, runner.ini); /data/docker stays root-owned and unwalked.
Also document the Recreate consequence: a template rollout SIGKILLs in-flight
jobs and Forgejo reports them as a plain failure with the log cut off mid-step
(sirius-growth push run 1422: 14 min red, log ending at 'Fetching the
repository').