The runner clones action repos into /data/.cache/act. Those files were created
by the root runner and a job now dies with
`open /data/.cache/act/actions-checkout@v4/.git/objects/pack/...pack: permission denied`
(run 123, deploy-site).
fix-data-perms now walks the top level of the data PVC and chowns everything
except `docker` (the dind data-root, deliberately root-owned) when the entry is
still root-owned — so a restart is cheap and future dirs are covered.
#54 (secops F6) inserted the new fix-data-perms init container at the
tolerations list indentation instead of under an initContainers key, and dropped
the key itself. YAML still parsed (a list item with name/image/... is just a
malformed toleration), so the merge was green, but the API rejects it:
Deployment.apps "forgejo-runner-arm64" is invalid:
spec.template.spec.tolerations[1].operator: Invalid value: "": operator must
be Exists when key is empty
That failed the dry-run of the whole apps Kustomization, so nothing in
apps/home could be applied at all - including any secret rotation - until it was
fixed. Nothing was pruned or broken in the cluster: the rejected revision never
applied.
Restores the initContainers: key above the block; the container's own body is
untouched, so F6's intent (re-own the PVC as 1000:1000 instead of chmod 666 on
the dind socket) is preserved.
Verified: the file parses to tolerations=[dedicated/Equal/network/PreferNoSchedule],
initContainers=[fix-data-perms], containers=[dind, runner]; server-side dry-run of
this Deployment succeeds; server-side dry-run of all 116 non-Secret objects in
apps/home reports no errors.
Measured during a crawl (2026-11-27 04:45-05:45Z): osint/news-scraper produced
~150 MB/h, 88 % of it one JSON item dump per crawled article (up to 4.7 kB per
line, the same rows are in the osint Postgres DB). At the observed 2.9x
compression that is ~10 GB over 192h and would not fit the 8Gi PVC, so drop
exactly those lines by prefix for that one container. Operational lines
(INFO/WARNING/ERROR, tracebacks, duplicate-URL warnings) still ship.
docs/logging.md: document the drop rule and the two measured regimes.
* sops-age is the one Secret that by definition cannot be in git; it was missing
from the exclusion table even though the key-location table covers it.
* replaces the placeholder reconciliation snippet with one that was actually run:
it prints 77 live = 35 in git + 42 excluded, matching the table line for line,
with nothing in git absent from the cluster.
The FastAPI app now publishes components.securitySchemes.adminSession
(apiKey/in:cookie/osint_session) and stamps security on every documented
operation from auth.is_public(). Merged as 6066ac8e0d6c in
sirius/osint-dashboard (PR #71); CI pushed
forgejo.siriusdevops.com/sirius/osint-dashboard:amd64-6066ac8e0d6c
(digest sha256:bf5f3d4ffbb7ae8cbe54fcf5f5b81cd5a1815d8abf9e042c2804f5a2d207ae6c).
The live /openapi.json keeps advertising no securitySchemes until this tag
is running, which is what F17 flagged.
No log store existed: pod logs were kubelet files on the node and died with the
pod (~8h deepest history for a busy workload). Adds:
- Loki 3.7.1 single-binary (1 Deployment + 8Gi local-path PVC on siriussec),
retention_period 192h with the compactor deleting on filesystem, ingest rate
limits, so the store is time- and rate-bounded.
- Alloy 1.13.0 DaemonSet (all nodes, no RBAC, no API access) shipping
/var/log/pods, /var/log/journal and the Pi's docker json logs. File sources
read from byte 0 and stamp the timestamp from the line, so the history the
nodes already held (18d cilium on linode, 31d registry on rpi) landed on day
one instead of starting the 7-day clock at deploy time.
- Grafana datasource (uid loki) via the existing sidecar, ServiceMonitor,
ingest-rate guard rule.
- docs/logging.md with the measured bytes/day, the 8-day projection and the
runbook.
Measured: ~360-502 MB/day raw -> ~90 MB/day compressed, 192h -> <=0.8GiB, on a
node with 103GiB free (house floor 32GiB). Verified 7-day-old lines return for
kube-system cilium-agent and for the siriussec/linode journals, and survive a
Loki pod restart (PVC).
#50 added monitoring/controllers/home/kustomization.yaml entries for
secret-grafana-admin / secret-grafana-secret-key / secret-alertmanager-telegram /
secret-cluster-backup-ssh but the four ciphertext files were not staged, so
kustomize build failed with 'no such file or directory' on the first entry and the
monitoring Kustomization went BuildFailed/ProgressingWithRetry (nothing was
applied or pruned — a failed build leaves the last applied state untouched —
so Grafana/Alertmanager never stopped).
Adds the missing files. Each was generated from the live object and decrypts to a
byte-identical data map, so the apply is a no-op.
Completes F12 on the objects deliberately held back until the delete-and-reconcile
drill on siriusdevops/siriusdevops-contact had proved the path works (it did:
deleted 05:29:03Z, recreated by Flux 05:29:05Z, byte-identical, pod restarted off
the recovered Secret and /health 200 — see docs/secrets-sops.md).
* cluster-backup-ssh in forgejo, sirius-growth and monitoring — three files, one
plaintext ed25519 key: a Secret cannot cross namespaces and each backup
CronJob mounts its own namespace's copy, so all three must exist and all three
must be rotated together.
* monitoring/grafana-admin, monitoring/grafana-secret-key and
monitoring/alertmanager-telegram, which are the *inputs* the prometheus-operator
and Grafana consume; the operator's rendered prometheus-*/alertmanager-* objects
stay excluded (a second writer would fight it).
* monitoring Kustomization gains the same sops decryption block as apps.
All six files were generated from the live objects and decrypt to a byte-identical
data map and type, so this apply is a no-op.
Measured on the live cluster: the 22.8 GB/day burst was driven by `list secrets`
(1.9 MiB per event — every secret in the namespace) and by helm-controller
rewriting its release blobs. Only list/watch give up their bodies now, so
"who rewrote this secret, and to what" stays reconstructable; steady state is
0.79 GB/day / ~420 events/min, i.e. ~6 days inside 48 x 100 MiB.
Re-verified after the change: create secret (server dry-run) records
requestObject.data; get/patch behave the same.
Records why hubble_lost_events_total{source="hubble_ring_buffer"} was
climbing with nothing dropped (backwards ring walk in getFlowRate hitting the
read boundary, cilium#46584), the 16383 capacity that covers the 60 s walk at
the 24 h peak on every node, the measured memory delta per node, the one-node-
at-a-time rollout, and the gate contract that a 30 min window with any loss may
not be reported as clean — with the alert/recorder names that enforce it.
PR #45 landed the forgejo-pull Secrets as SOPS ciphertext in git while this doc
still described them as out-of-band. A kubectl apply of a new Secret is now
reverted by the next apps reconcile, so the rotation and add-a-namespace
recipes go through the encrypted file. Also records that the registry-reader
token is non-expiring and that a rotated value is picked up on the next pull.
The apiserver ran with no --audit-* flags at all: secret reads, pods/exec,
RBAC writes and serviceaccounts/token minting left no record anywhere.
- /etc/kubernetes/audit/audit-policy.yaml: RequestResponse for secrets
get/write, pods/exec|attach|portforward, serviceaccounts/token, rbac.*,
certificates.*, impersonate; Metadata for list/watch/update of secrets and
for everything else (that split is what keeps 22.8 GB/day down to 2.5).
- static-pod flags: --audit-policy-file, --audit-log-path (JSON, 100 MiB x 48,
maxage 7, compressed) + hostPath mounts for the policy dir and the log dir.
- install-audit.sh: idempotent, byte-identical re-application after a
kubeadm upgrade silently regenerates the manifest (Flux does not own it).
- docs/kube-apiserver-audit-logging.md: design, measured volume, sensitivity
(the log holds secret bodies), verify commands and rollback.
Nothing in the cluster was reconciled from the repo: 67 hand-made Secrets and no
managed Secret at all, so a restore of this Git tree produced a cluster that would
not start. This commits the first-party ones as SOPS/age ciphertext and enables
Flux's sops decryptor.
* provider: SOPS + age (chosen over SealedSecrets: Flux already ships the sops
decryptor, so no extra controller/CRD, and the age key is escrowed off-cluster).
* 29 Secrets across forgejo, siriusdevops, piedmont, sirius-growth, osint,
metabase and customer1, as apps/base/<ns>/secret-<name>.sops.yaml with
encrypted_regex ^(data|stringData)$ — names/namespaces stay reviewable.
* each file was generated from the LIVE object and decrypts to a byte-identical
data map and type, so the first apply is a no-op (not a rotation).
* the CNPG bootstrap secrets (forgejo-pg-app, pg-app, sirius-growth-portal-db)
are ours, not operator output — bootstrap.initdb.secret points at them, so a
rebuild has no application password without them.
* forgejo-pull is included despite docs/registry-pull-auth.md calling it
out-of-band: with imagePullSecrets on every workload it is the one Secret whose
absence stops the whole cluster from pulling images.
* .gitignore keeps **/*secret*.yaml ignored and re-includes only .sops.yaml, so a
plaintext Secret still cannot be committed; age.agekey stays ignored.
* excluded on purpose (controller/helm-owned): CNPG *-server/*-replication/*-ca,
cnpg-system CA+webhook, cert-manager webhook CA, cilium/hubble certs, helm
release records, prometheus-operator rendered prompts. Full table in
docs/secrets-sops.md.
Key locations (never in git): Secret flux-system/sops-age (age.agekey) and
/root/sops/homek8s-age.key on the Linode, reached only over the mesh.
hubble_lost_events_total{source="hubble_ring_buffer"} was climbing at a
constant 12/min on siriussec (72,529 cumulative) and ~4/min on linode with
nothing dropped: Ring.read() synthesises a HUBBLE_RING_BUFFER lost event when
a backwards walk reaches the ring's read boundary, and getFlowRate() walks a
full minute on every hubble status / 5 s health probe / UI request. At
siriussec's ~80 flows/s the 4095-event default only holds ~51 s, so every
probe hit the boundary (cilium#46584).
16383 holds >= 60 s at the 24 h peak on every node (linode 196 flows/s ->
83 s, siriussec 101/s -> 161 s, rpi 38/s -> 431 s), so the walk exits on the
timestamp check instead. Ring accepts 2^n-1 only.
Also wire the sensor gate: recorders hubble:lost_events_increase_30m /
hubble:flows_processed_increase_30m, alert HubbleFlowWindowIncomplete when a
30 min window has any loss (a lossy window may not be reported as clean),
HubbleFlowLossMaterial above 0.1% of processed flows, and
HubbleFlowSensorMissing when the counters disappear entirely.
Forgejo 16 mints an anonymous ("ghost user") registry token on /v2/token and
grants it Read on every package regardless of repo visibility, so all 18 app
images were world-downloadable — including images of private repos
(siriusdevops-site, phs-site, sirius-growth-*, sgs-leadgen).
* FORGEJO__service__REQUIRE_SIGNIN_VIEW=true: /v2/token answers UNAUTHORIZED
to anonymous clients, anonymous manifests get 401. This is the documented
switch in routers/api/packages/container (Authenticate) and
services/context/package.go (determineAccessMode). Side effect: the Forgejo
web UI/API becomes login-only for anonymous visitors.
* imagePullSecrets: [forgejo-pull] on all 18 workloads that pull from the
registry (osint, piedmont, sirius-growth, siriusdevops). The
kubernetes.io/dockerconfigjson Secret is per-namespace and out of band
(never in git); docs/registry-pull-auth.md documents why, how to recreate
it, and the verification commands. No containerd-level credential.
Alertmanager was disabled in values.yaml, so every PrometheusRule on the
cluster evaluated into nothing: 5 alerts were firing at audit time,
including PrometheusNotConnectedToAlertmanagers.
- alertmanager.enabled: true, 1 replica pinned to siriussec, small
resource caps, operator mounts Secret monitoring/alertmanager-telegram
(created out of band; never in git).
- Receiver: Telegram @Siriusdevops_alert_bot chat 7528130947. This is the
dedicated alert bot, NOT the Hermes gateway bot, so alerts cannot loop
back into the agent.
- Routing: default -> telegram; Watchdog and InfoInhibitor -> null
blackhole (Watchdog fires forever by design), severity=info -> null.
Chart-default inhibit_rules kept.
- Prometheus alerting is generated by the chart from alertmanager.enabled,
so prometheus.spec.alerting now points at the new StatefulSet/Service.
- Retention untouched: 7d / 8GB.
Finding F2 of the 2026-11-27 cluster netsec audit: cilium-envoy on siriussec
binds gateway-system/public on 0.0.0.0:8080, so anyone on 192.168.1.0/24 could
`curl -H 'Host: forgejo.siriusdevops.com' http://192.168.1.179:8080/` and get
Forgejo (and every public site) over plain HTTP — no Cloudflare TLS, WAF, rate
limits or bot protection, and credentials on the wire inside the LAN. Live:
200 / 14609 B before this change.
The `internal_gw` nft table that already makes 8081/8084-8087 WG-only simply
did not list 8080. Add it to all three rules (lo, mesh+pods, drop), and to the
rpi ufw guard so a future `gateway=true` relabel on the Pi cannot re-open it.
Nothing legitimate needs the LAN path: cloudflared runs on rpi and connects to
10.10.0.2:8080 from 10.10.0.1 over the mesh (`ss` on siriussec shows
`10.10.0.1:* -> 10.10.0.2:8080 ESTABLISHED`), which the 10.10.0.0/24 accept
covers. 10.244.0.0/16 stays accepted for in-cluster probes.
Verified both polarities: LAN 192.168.1.179:8080 -> timeout/DROP (from two
vantage points), mesh 10.10.0.2:8080 -> 200 for all five public hostnames, and
all five public URLs still 200 through Cloudflare.
Security runs had no read-only identity: every audit ran as kubernetes-admin
(system:masters), the identity that can delete the cluster, so the auditor was
the largest privilege holder in the environment.
New ns secops with SA secops-auditor bound to a from-scratch ClusterRole:
get,list,watch pods services endpoints events configmaps namespaces nodes
get,list,watch * in apps, batch, networking.k8s.io,
gateway.networking.k8s.io, cilium.io
get pods/log
Deliberately absent: secrets (all verbs), pods/exec, pods/attach, every write
verb, impersonate/escalate/bind. Not bound to view/edit/admin (all three carry
Secrets; edit reads Secret data).
The bearer token is a credential and is generated out of band into
~/.kube/secops.yaml (mode 600) — see the SA manifest comment for the one-liner.
Rename the client-shaped lab replica namespace and its manifests to keep the
client name out of the repo going forward (git history is intentionally not
rewritten).
- apps/base/farrisilk -> apps/base/customer1 (namespace, workloads, PVCs,
HTTPRoutes, backup CronJob, README)
- infrastructure/networking/internal/gateway-farrisilk-{odoo,metabase}.yaml ->
gateway-customer1-{odoo,metabase}.yaml (listener ports unchanged: 8086/8087)
- firewall comment headers updated (rules/ports untouched)
No functional change beyond object names; workloads remain parked at 0.
siriusdevops-site:e2fd76ad (merge of PR #19) replaces the $750–$1,500
audit anchor in the /book funnel with 'scoped and quoted after the review'.
contact-api is unchanged at 8642f1a.
Self-registration was open until 2026-11-20 and Google indexed spam
profiles under forgejo.siriusdevops.com (/leonabrewton8, /charlinebrando,
.../-/packages). The accounts are deleted and 404 now, but Forgejo's
built-in robots.txt only blocks /explore/*?* and /user/, so /explore/repos
and /search stay crawlable.
Forgejo serves GITEA_CUSTOM=/data/gitea/public/robots.txt at /robots.txt,
so mount a ConfigMap there (the supported custom-public override) and
disallow /explore/*, /user/*, /search*, /api/*, /*/-/packages while
allowing /sirius/* for the portfolio repos.
siriussec is on a 15 W USB-C adapter and low-battery-shutdown fired 2026-11-22
04:20. The farrisilk replica (Odoo + Metabase JVM + Postgres) is the largest
single stack on that node and is not client production. Scale its three
Deployments to 0 and suspend the nightly pg_dump; PVCs and data stay put.
Restore: set replicas back to 1 in odoo.yaml, metabase.yaml, postgres.yaml and
unsuspend backup.yaml, then let Flux reconcile.
siriussec is a T480 on a 5V/3A (15W) USB-C supply and died 2026-11-22 04:20
after ~12h on battery. Host PL1 was 25W with turbo on, so any sustained burst
outran the adapter. Cap the two workload-side bursts that can pin cores:
- forgejo-runner-amd64 dind: no CPU limit before -> add cpu: 3
- metabase + farrisilk metabase: cpu limit 2 -> 1 each (two JVMs = 4 threads)
Host-side cap (PL1 12W/PL2 15W, no_turbo=1) is applied by
cpu-power-cap.service on the node itself, not by this repo.