Commit graph homek8s/apps
Author SHA1 Message Date
tui-design
a385a8a360 ci(forgejo): give amd64 job containers the docker CLI
Dispatch of the rewired osint build (run 1363) reached the new login step and
died with '/var/run/act/workflow/3: line 9: docker: command not found'.

amd64.toml only set docker_host, which injects the socket bind but not a CLI,
and the job image is node:20-bullseye (no docker). arm64.toml already solves
this by bind-mounting the dind sidecar's own /usr/local/bin/docker and
cli-plugins into the job container; do the same here and drop docker_host so
the socket is not mounted twice.

No --memory cap: this runner also carries the existing amd64 release builds,
which were already uncapped.
2026-11-17 15:14:06 -05:00
tui-design
318e633419 ci(forgejo): let the amd64 dind daemon push to the in-cluster registry
Forgejo's container registry now lives in the cluster and is reachable only
as the plain-HTTP ClusterIP forgejo.forgejo.svc.cluster.local:3000. Docker
treats only 127.0.0.0/8 as insecure, so any workflow logging in to or pushing
to that host would fail with "server gave HTTP response to HTTPS client".

Adds --insecure-registry for that host to the amd64 dind daemon, which is the
runner the osint-dashboard build now targets (amd64 matches the cluster, so
images are usable on the nodes).
2026-11-17 15:14:06 -05:00
Lance Walters
d9bde195cd apps(forgejo): clear stale dind pid on start so runner restarts self-heal
The dind container mounts the dind-run emptyDir at /var/run. A reboot
restarts the container inside the same pod, so that emptyDir keeps the
dead daemon's docker.pid; dockerd then aborts with "process with PID N
is still running" and the runner sits in CrashLoopBackOff until someone
deletes the pod. Removing the stale pid and socket before starting
dockerd makes both the amd64 and arm64 runners recover on their own.
2026-11-16 20:41:20 -05:00
Lance Walters
274b3aaaed docs(osint): syndication dedupe knobs and the d04ddc9afacb pin 2026-11-13 22:20:58 -05:00
Lance Walters
a9d3a4eb33 apps(osint): summarizer d04ddc9afacb — syndication dedupe before selection
PR #55 collapses normalised-title duplicates (7 Hearst stations carrying one
wire story) to the best-scoring representative before min_score/top_n, stores
duplicates with selected=false + duplicate_of, and exposes SUMMARY_DEDUPE /
SUMMARY_DEDUPE_SIMILARITY (0.85).
2026-11-13 22:16:50 -05:00
Lance Walters
aede328bf0 docs(osint): analyst grading rubric, thresholds and article_scores 2026-11-13 22:08:07 -05:00
Lance Walters
7edb32f627 apps(osint): summarizer fa745ee3f7ae — closed window + fallback score floor
PR #54: get_recent_news() now ends at NOW() so future-dated event listings are
no longer re-graded every interval, and the fallback can only pick blocks with
score >= SUMMARY_FALLBACK_MIN_SCORE (40) instead of taking the top N blind.
2026-11-13 21:58:06 -05:00
Lance Walters
6d4813e2ec apps(osint): map-phase grading — summarizer 2c41737d42dd + score thresholds
PR #53 grades every article 0-100 inside the existing map call (no extra
round-trip), passes only blocks >= SUMMARY_MIN_SCORE to the reduce prompt and
persists article_scores for threshold tuning. Pin the rebuilt summarizer and
set min_score=60 / top_n=12 / fallback_top=3 in the ConfigMap.
2026-11-13 21:49:49 -05:00
Lance Walters
550bbdc61d docs(osint): news-list hygiene guards and the 58f71f5b4520 pins 2026-11-13 21:47:04 -05:00
Lance Walters
ff1dc24b93 apps(osint): 58f71f5b4520 — future-dated items dropped at ingest, hidden in /api/news
PR #52: the Scrapy pipeline drops items dated >2h ahead (event listings were
pinning ORDER BY timestamp DESC), and /api/news excludes rows where
timestamp > now() as a second guard. Rebuild app + scraper at the merge sha.
2026-11-13 21:43:58 -05:00
Lance Walters
46aec23af7 docs(osint): cookie is Secure via ADMIN_COOKIE_SECURE; pin 84ea0a17b1af 2026-11-13 21:18:48 -05:00
Lance Walters
def2556ee7 apps(osint): ADMIN_COOKIE_SECURE=1 and the 84ea0a17b1af build
osint-dashboard master 84ea0a17b1af (PR #51) makes the session cookie Secure
when ADMIN_COOKIE_SECURE is truthy, because the tunnel's HTTP origin means
Envoy never lets X-Forwarded-Proto through as https. Set the flag in the
ConfigMap and pin the three app-image consumers to the rebuilt catalyst.
2026-11-13 21:17:28 -05:00
Lance Walters
c073ec9308 docs(osint): build the merge sha from a detached worktree; note the deleted decoy tag 2026-11-13 21:13:46 -05:00
Lance Walters
28f09d5809 docs(osint): admin login, osint-admin Secret, and the known Secure-cookie gap 2026-11-13 21:12:16 -05:00
Lance Walters
5b9d179239 apps(osint): correct the auth image tag
The first pin (:amd64-d8113b37b8ac) was built from a stale working tree — the
local checkout sits on fix/dashboard-geofence-vessels-sentinel-news, not
origin/master, so the image carried no app/auth.py and the deployed HUD still
served /api/keys open with /login 404. Rebuilt from a detached worktree at
d8113b37b8ac (:amd64-d8113b37b8ac-r1, verified /app/app/auth.py exists in the
image) and repin the three consumers.
2026-11-13 21:09:38 -05:00
Lance Walters
426fc24d66 apps(osint): pin the auth build and wire the single-admin Secret
osint-dashboard master d8113b37b8ac adds app/auth.py: deny-by-default on
/api/* with a public read allowlist, so visitors get the map + news and only
the admin gets keys/settings/mutations. Pin the amd64 image (:amd64-d8113b37b8ac)
on app, camera-service and ingester, and feed ADMIN_USER /
ADMIN_PASSWORD_HASH / ADMIN_SESSION_SECRET from Secret osint-admin.

The refs are optional: true on purpose — a missing Secret must not stop the
pod; the app then fails closed (admin routes 403) while the public HUD serves.
2026-11-13 21:06:43 -05:00
Lance Walters
4ac1cd42d1 apps(osint): BATCH_SIZE=4 for the Nous free-tier summarizer
Map phase has a hard 60 s httpx timeout and meituan/longcat-2.5:free needs
~30 s for 8 articles: batch 1 of the first real run returned 200 in 30 s,
batch 2 hit the 60 s ceiling and contributed nothing. 4 keeps every batch
inside the timeout.
2026-11-13 20:33:47 -05:00
Lance Walters
cb86b6972f apps(osint): fix Postgres image base (bookworm) + nats monitoring port
The cluster PG image built FROM postgres:16 resolved to Debian trixie, whose
postgresql-16-postgis-3 (3.7.0+pgdg13) cannot load against PG 16.15:
'undefined symbol: heap_datum_check'. CREATE EXTENSION postgis crashed the
server and crashlooped osint-app/osint-camera-service. Rebuild pinned to
postgres:16-bookworm (+pgdg12), verified CREATE EXTENSION postgis +
timescaledb + create_hypertable() by hand before re-tagging.

nats: pass -m 8222 so the monitoring/healthz endpoint the readiness probe hits
actually listens.

Also documents the stack + build/push/secret steps in apps/base/osint/README.md.
2026-11-13 20:20:09 -05:00
Lance Walters
f290b3c457 apps(osint): deploy OSINT dashboard stack to k8s at osint.siriusdevops.com
New namespace `osint` with the full dashboard stack ported from the Pi docker
compose file: TimescaleDB+PostGIS Postgres, NATS JetStream, FastAPI app,
ingester, camera-discovery service, TiTiler tile proxy, and the vendored news
pipeline (Scrapy scraper + Nous Portal summarizer).

- Images built amd64 (the Pi CI only builds arm64) and pushed to the Forgejo
  registry as :amd64-c48788d4b614; nats/titiler mirrored there too so every
  pod pulls from one host.
- All workloads pinned to siriussec (Gateway/Envoy co-location, local-path PVs).
- Postgres is a Deployment+PVC, not CNPG: the alembic chain needs postgis +
  timescaledb extensions and create_hypertable().
- HTTPRoute osint.siriusdevops.com: /titiler prefix-stripped to TiTiler,
  everything else to the app (incl. /ws/live).
- DB password is Secret osint-db, created out of band (not in git).
- Analyst model = meituan/longcat-2.5:free on Nous Portal (free tier).
2026-11-13 20:14:42 -05:00
Lance Walters
6049a09c6e apps(sirius-growth): pin blog 4378680 (new SG-tree mark, favicon-32, apple-touch-icon) 2026-11-06 16:36:06 -05:00
Lance Walters
017718ba41 apps(sirius-growth): pin site 413d98f (new SG-tree logo icons) 2026-11-06 16:19:05 -05:00
Lance Walters
fd555ffb87 apps(sirius-growth): pin site 494632d (radish hero plate restored, two-column hero) 2026-11-05 21:08:57 -05:00
Lance Walters
c4f7e6378e apps(sirius-growth): pin site 2b10d99 (hero plate removed, one-column hero) 2026-11-05 20:50:04 -05:00
Lance Walters
aa71da2f31 apps(sirius-growth): blog Deployment/Service + pin site d44446c (journal mount)
- deployment-blog.yaml / service-blog.yaml: blog FastAPI on 8092, siriussec,
  env from sirius-growth-blog-app + sirius-growth-blog-s3,
  PUBLIC_BASE_URL=https://siriusgrowthsolutions.com/journal. No HTTPRoute: the
  site nginx proxies /journal to this ClusterIP service.
- deployment.yaml: site 4285926 -> d44446c (nginx /journal proxy, nav menu).
- portal Deployment untouched.
2026-11-05 13:07:26 -05:00
Lance Walters
be8233079b apps(sirius-growth): pin portal ce350ed + site 4285926 (calendar page, feed kind, application series) 2026-11-05 11:39:32 -05:00
Lance Walters
1fb49c0507 apps(sirius-growth): pin portal efd5b61 + site 7d7fd4c (phase 3: action items, .ics feed, alerts, print view) 2026-11-04 01:39:11 -05:00
Lance Walters
5a9400790c apps(sirius-growth): wire TG_TOKEN/TG_CHAT into the portal from sirius-growth-contact
The portal-api image gained Telegram-only operator alerts (phase 3C) but reads
TG_TOKEN/TG_CHAT at startup; unset, it logs one line and no-ops. Reuse the same
bot and secret the contact service already uses - no new secret, no value in git.
2026-11-04 01:39:10 -05:00
Lance Walters
b7f5e0105d apps(sirius-growth): pin portal 71c7eec + site a72ea75 (phase 2: crew logging schema, thread attachments)
portal-api: multipart message attachments with magic-byte sniffing, owner-checked
GET /api/portal/attachments/{id}; measured_by/application logging with
logged_by_role. site: crew self-logging forms, Specialist/Crew badges, photo
picker + lazy inline thumbnails.
2026-11-04 00:41:01 -05:00
Lance Walters
6cfa86d25d apps(sirius-growth): pin site 1bdcdcd (phase 1 dashboard: baseline panel, target bands, readings table) 2026-11-03 23:42:31 -05:00
Lance Walters
07caa865da apps(sirius-growth): pin portal 540ca05 (phase 1 diagnostics API: input readings, zone targets, site baseline) 2026-11-03 23:42:31 -05:00
Lance Walters
e4c7fd9ff7 apps(sirius-growth): pin site 040d3e1 (root-absolute admin CSS/JS)
site :040d3e1d5c6bae57c7b4d5edd00b4a969bb8718d (deploy-site run 91,
success) loads style.css/portal.css/portal.js root-absolute so
/admin/leads and /admin/settings stop 404ing on /admin/css/… and
/admin/js/… and the Leads table renders. Registry digest
sha256:bd83baa6…ffcd. Portal pin untouched.
2026-11-03 21:33:01 -05:00
Lance Walters
a80d7e233f apps(sirius-growth): pin portal 0f156d2 + site 0b4a8c0 (admin split, zones, messages, inline files)
portal :0f156d2f17aab3461ba4c5d7d4d8988861b2b14b (deploy-portal run 87,
success) carries the zones API (bcdba9d), inline file disposition and the
last-message fields; registry digest sha256:90d9c89d...6643.

site :0b4a8c0a27c35855eab03ebaa23a7ab5229245a8 (deploy-site run 90, success)
is the admin split plus per-client zones/messages UI and the dashboard zone
filter with inline previews, and gates /admin/leads + /admin/settings in all
three nginx variants; registry digest sha256:ab680c5b...5adf.
2026-11-03 21:14:54 -05:00
Lance Walters
695bd90449 apps(sirius-growth): pin portal bcdba9d (named zones per client) 2026-11-03 20:38:59 -05:00
Lance Walters
6ca43350fa apps(sirius-growth): pin portal f02cea9 + site b274454 (onboarding validation errors) 2026-11-03 19:44:35 -05:00
Lance Walters
b68b22288e apps(sirius-growth): pin site ed3ca8f (root-check hook band + second diagnostics link) 2026-11-03 14:36:19 -05:00
Lance Walters
c2b502ba57 apps(sirius-growth): pin site db63ff1 (admin password 401 redirects to /signin?next=/admin) 2026-11-03 13:17:40 -05:00
5036d853bf SGS portal: nginx login gate — rate-limit /api/portal/login (12r/m, burst 6) 2026-11-03 18:16:03 +00:00
Lance Walters
c77b5a6e80 apps(sirius-growth): pin site be32304 (js/css revalidate rule, narrowed to /js/ /css/) 2026-11-03 13:13:42 -05:00
Lance Walters
418f2c5fc0 apps(sirius-growth): pin portal adbf227 (Cache-Control: no-store on /api/portal/*) 2026-11-03 12:49:44 -05:00
Lance Walters
45c3b8533b apps(sirius-growth): sgs-leadgen weekly CronJob (ET) + monthly NCDA job + state PVC
Runs the published amd64 image forgejo.../sgs-leadgen:eef9358 with DATABASE_URL
from sirius-growth-portal-app and the contact bot's Telegram pair; /data on a
local-path PVC pins to siriussec, /tmp on an emptyDir so the root fs stays RO.
2026-11-03 12:46:27 -05:00
Lance Walters
d5193c2525 apps(sirius-growth): pin site c03101f3 (admin UI) and portal a150b6f3 (leads/password/remove) 2026-11-03 12:36:37 -05:00
Lance Walters
c2c7e8d9e7 apps(sirius-growth): pin the site to 37329e3 (alt-band alignment fix) 2026-11-03 12:21:24 -05:00
Lance Walters
5c6c8b71c0 apps: re-pin the contact APIs to their new :sha tags
Both contact APIs now have amd64 build+push pipelines:
sirius-growth/.forgejo/workflows/deploy-contact.yml (contact-api/)
and sirius/websites/.forgejo/workflows/deploy-phs-contact.yml
(phs-contact-api/). Each printed the tag for its first run, so the
@sha256: pins (which existed only because there was no build path)
become ordinary :<sha> tags an operator can bump.

docs/site-image-pinning.md: drop the 'no CI build path' section and
record the two workflows in the pins table.
2026-11-02 18:09:48 -05:00
Lance Walters
41bacb90e4 apps: retire the site-deployer ServiceAccount
Nothing in CI holds cluster credentials any more: every site image is pinned
by tag/digest in this repo and rolled by Flux, so the siriusdevops and
sirius-growth 'site-deployer' SA/Role/RoleBinding are dead. Dropping them from
the kustomizations lets Flux prune all six objects, which also revokes the
8760h tokens behind the KUBE_CONFIG action secrets (deleted separately, and
only after the pins were verified live).

piedmont never had a deployer.yaml: its CI identity (phs-site-deployer) was
created out-of-band and is removed by hand in the same change.
2026-11-02 17:22:06 -05:00
Lance Walters
5273a993f2 apps: pin every first-party site image to an immutable ref
Replace ':latest' + imagePullPolicy: Always on all seven site images with a
pinned tag (or digest) and IfNotPresent, so the image a Deployment runs is
chosen by this repo and rolled by Flux, not by CI patching restartedAt.

Every pin is the image that was already running, so the change is a no-op for
visitors: each pinned tag's manifest/config digest equals the running pod's
imageID (siriusdevops-* f0dde2f4, growth-site ea306b7, growth-portal d9e558c4,
phs-site 5b590cd).

sirius-growth-contact and phs-contact have no CI build path (no workflow has
ever pushed anything but :latest for them), so they are pinned by @sha256:
digest rather than inventing a pipeline; documented in
docs/site-image-pinning.md along with the operator flow.
2026-11-02 17:17:36 -05:00
hermes
0a97d9305f forgejo runners(arm64): dind registries need --insecure-registry for the Pi's WG address
First post-cutover deploy-site run (task 1732) built the image and then died
pushing it: docker only treats 127.0.0.0/8 as insecure by default, so
'Get "https://10.10.0.1:5000/v2/": http: server gave HTTP response to HTTPS
client'. Flag the daemon, not the job image, on both arm64 runners so no
workflow needs to know.
2026-10-27 02:57:48 -04:00
Lance Walters
e572f84b0b 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).
2026-10-27 02:07:07 -04:00
Lance Walters
131b9bc7c9 forgejo runners(arm64): run both arm64 runners as in-cluster dind pods
The Pi's host Docker is no longer the arm64 job-container daemon. Both
forgejo-runner-arm64 and forgejo-runner-deploy-arm64 now run a privileged
docker:27-dind sidecar (--mtu=1420, socket on an emptyDir shared with the
runner, data-root on a PVC), the same shape as forgejo-runner-amd64.

- labels preserved verbatim: shared keeps docker-arm64/arm64/docker, deploy
  keeps deploy-arm64 only; capacity 1 on both
- runner.ini moved from hostPath to the data PVC by copy, uuid preserved
  (4e07c1e9... / a41aad73...); the deploy runner's register init container is
  inverted into a guard so a missing file cannot burn a token and create a
  second runner
- dind limits.memory 4Gi (measured peak 3.10GiB) and 2Gi for the deploy runner
  so a CI run and a deploy cannot both claim the Pi's 7GiB
- static hostPath PVs pinned to rpi with Retain: dynamic local-path cannot
  provision there (helper pod hardcoded to siriussec)
- docker CLI/buildx come from the dind image instead of the host's docker-static
- Pi registry additionally published on 10.10.0.1:5000 (out of band on the Pi)
- RpiDindDataRootFillingUp at 70%: the real cap, since a static PV does not
  enforce its claim and kubelet_volume_stats_* does not exist here

Design and measured proof: docs/arm64-runner-dind.md (t_627c231c).
2026-10-27 02:03:11 -04:00
Lance Walters
58b7ed4a13 forgejo/prune: keep the job pod out of dind discovery
The Job pod carried app=forgejo-runner, so every run matched itself and
logged a confusing skip. It now carries app=forgejo-prune; discovery is
unchanged (label app=forgejo-runner + a dind container).
2026-10-27 01:45:57 -04:00
Lance Walters
f1fcf21a94 forgejo/prune: prune every Docker daemon, cap builder cache by age, alert on growth
The nightly CronJob reported Complete while never reclaiming build cache:
docker 27/buildx 0.20.1 accepts --keep-storage and --max-used-space but
returns 'Total: 0B' for both (measured: 21.44GB cache with a 20GB cap, and
541MB cache with a 100MB cap). The comment claiming 53GB reclaimed was true
on an older CLI and is now false. --filter until= does reclaim, so the cash
cap is enforced by walking age windows down (72h -> 0s) and stopping as soon
as the cache is under the cap.

Coverage is now every daemon, discovered not listed: the Pi host socket and
every in-cluster dind pod matching label app=forgejo-runner with a dind
container, pruned over pods/exec with a namespace-scoped ServiceAccount, so
the arm64 dind migration is picked up without editing this job.

Busy guard skips a daemon with a live build and still exits 0. Named volumes
are never pruned; their sizes are printed every run. Adds PrometheusRule
forgejo-prune: cronjob staleness/failure plus node filesystem high-watermark.
2026-10-27 01:43:20 -04:00