Commit graph homek8s/apps
Author SHA1 Message Date
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
Lance Walters
9e851f4dfe monitoring: custom Forgejo runner, CNPG and workload dashboards from git
Dashboards (uid forgejo-runners, cnpg-postgres, home-lab-workloads) live as
ConfigMaps generated from monitoring/controllers/home/dashboards/build.py and are
loaded by the kube-prometheus-stack grafana sidecar.

Postgres was not scraped at all before this: add a hand-written PodMonitor per
CNPG cluster (release=kube-prometheus-stack, which is what this Prometheus's
podMonitorSelectorNilUsesHelmValues default requires) plus
spec.monitoring.customQueriesConfigMap on both Clusters. enablePodMonitor stays
false — deprecated in CNPG 1.27 and it gives no control over labels.

pg-actions-queries.yaml adds the Forgejo Actions queue/outcome/last_online
metrics that only the forgejo database can answer.

prometheus-node-exporter is no longer pinned to siriussec: the arm64 runner's
jobs are host containers on rpi, so the Pi's root filesystem is the disk that
matters there and kubelet cannot see it.

docs/monitoring-dashboards.md documents the PromQL, the exporter GRANT and the
known unknowns (arm64 per-job breakdown, hostPath PVs have no kubelet volume
stats, single-instance replication, no backups).
2026-10-27 01:32:20 -04:00
Lance Walters
2eff85ba04 forgejo-runner-amd64: run the runner as root so a raced dind socket chmod cannot crashloop it 2026-10-26 17:38:04 -04:00
6db984f3d5 forgejo: builder prune by --keep-storage, not --filter until
The until=72h filter reclaimed 0 B against a 74 GB cache on the Pi's docker
29 daemon (proven by running the prune manually). --keep-storage 20GB
reclaimed 53 GB and leaves a warm cache for the next site/portal build.
Volumes are deliberately never pruned: CI's target/SDK/Gradle volumes are
unused between runs but essential.
2026-10-23 00:28:40 -04:00
fbae77e985 forgejo: give the prune job an hour
Container removal on the Pi measured ~10 min for 48 containers with a ci job
live; 30 minutes would kill the run half-way through the 61 GB image prune.
2026-10-23 00:13:36 -04:00
741b9f13a7 forgejo: let the deploy runner's init container write runner.ini; cap job memory; prune nightly
- init container runs as root: kubelet creates the hostPath /data as root:root
  and the runner image's default user cannot write runner.ini there.
- container.options --memory 3g on both Pi runners: two concurrent jobs must not
  take the 8 GiB Pi (already using swap) to OOM. Caps the job container only.
- forgejo-runner-prune CronJob: exited containers >48h, images >168h, builder
  cache >72h, so the single 917G / volume stops climbing.
2026-10-22 23:55:21 -04:00
1576240941 forgejo: dedicated deploy-arm64 runner so CI cannot starve site deploys
deploy-site.yml must run on the Pi (127.0.0.1:5000 registry, Garage on host
network, host docker socket) but the Pi's only runner also serves every
runs-on: docker job in the instance. An onionwire Rust ci build therefore held
the single docker slot while the sirius-growth deploy sat in 'waiting'.

Adds a second runner instance on rpi declaring only the deploy-arm64 label,
with its own hostPath-backed registration (/opt/siriusdevops/runner-deploy/data)
so a pod restart reuses it instead of burning a single-use runner token.
2026-10-22 23:52:54 -04:00
Lance
45951c6200 siriusdevops: add a scoped CI deployer ServiceAccount
The site repo's CI used to ssh to the Pi and run docker there. It now rolls the
k8s Deployments through the API, so it needs an identity limited to
get/list/patch on deployments in this namespace (same pattern as sirius-growth).
2026-10-20 10:06:51 -04:00
Lance
237722b581 ingress: move public apps off the retired linode node onto siriussec
Linode VPSs are shut down. The Gateway listener has to be co-located with the
backend pods (hostNetwork Envoy returns 503 for cross-node backends), so all
public workloads now schedule on siriussec and the tunnel origin points there.

- nodeSelector linode -> siriussec (piedmont, sirius-growth, siriusdevops)
- siriusdevops site/contact now pull rebuilt images from the Forgejo registry
  (the old :dev tags existed only on the dead VPS containerd)
2026-10-20 09:01:24 -04:00
devops
77d658b719 sirius-growth: portal image from CI tag latest, drop hand-pushed digest pin 2026-10-19 03:47:28 -04:00
Lance Walters
90355d4a76 sirius-growth: deploy the portal API on the existing hostname
FastAPI portal on 8091 behind /api/portal, image pinned to the API
commit 406f25c and its manifest digest. Route sits after /api/contact
and before the catch-all. Env comes from the sirius-growth-portal-app
Secret (DB URL, session secret, admin creds, Garage S3 keys); nothing
secret is in git.
2026-10-19 03:30:03 -04:00
Sirius DevOps
73cc883d5e sirius-growth: add CNPG Cluster 'portal' (1 instance, 5Gi local-path on siriussec)
Database only. Bootstraps database/owner 'portal' from the
sirius-growth-portal-db basic-auth Secret. No API or route changes.
2026-10-19 03:03:09 -04:00
Sirius DevOps
bb1ace7041 sirius-growth: declare the CI deployer ServiceAccount
The site repo's CI rolls the Deployment after pushing a new image, using a
kubeconfig stored as a repo secret. The token came from a ServiceAccount that
only existed because it was created by hand; declare it so a cluster rebuild
does not silently break deploys. Namespace-scoped, deployments only,
get/list/patch.
2026-10-19 00:44:48 -04:00
Lance Walters
5854f5a38b feat(sirius-growth): route /api/contact ahead of the page
Same shape as piedmont. The contact Deployment uses the new image.
2026-10-18 16:00:10 -04:00
Lance Walters
562343c33c feat(sirius-growth): route siriusgrowthsolutions.com to the site
No Cloudflare change in this commit. Origin must answer 200 before the tunnel is updated.
2026-10-18 15:26:00 -04:00
Lance Walters
5a98fd620f feat(sirius-growth): deploy the static site on linode
No HTTPRoute: no public hostname has been named. Photos stay on the
Pi Garage listener, which is loopback-only.
2026-10-18 02:52:08 -04:00
Lance Walters
1242f3041e feat(piedmont): route /api/contact to piedmont-contact
Add the contact Deployment and Service, and match PathPrefix /api/contact before the site catch-all so the quote form does not hit nginx.
2026-09-30 23:50:03 -04:00
lance
d8f46972fb feat(piedmont): deploy PHS site + HTTPRoute for piedmonthomesvc.com
Serves the handyman site from the cluster instead of the Pi's dead
nginx/registry/Garage stack. The 78 /photos/ paths the site requests are
already baked into assets/portfolio/, so the image serves them via an
nginx alias and the Garage bucket is no longer a runtime dependency.

Image: forgejo.siriusdevops.com/sirius/phs-site:latest (public package).
2026-09-29 22:32:11 -04:00
Lance Walters
09ad7485af fix(forgejo): arm64 runner back to multi-arch forgejo/runner image
alex3305/forgejo-runner-dind ships an amd64 binary in its arm64 manifest,
so the Pi failed with 'exec /usr/local/bin/forgejo-runner: exec format
error'. That took pi-runner (the only runner declaring the bare 'docker'
label) offline and stalled every runs-on: docker job.
2026-09-18 23:50:30 -04:00
Lance Walters
9bbbe75279 switch other runner container 2026-09-18 23:38:58 -04:00
Lance Walters
320ae6106f replicas back to 1 2026-09-18 23:36:52 -04:00
Lance Walters
1ceadc112d chamge runner image 2026-09-18 23:25:19 -04:00
Lance Walters
39560ec003 bump up runner replicas 2 2026-09-18 23:12:30 -04:00
Lance Walters
4640f164c3 forgejo-runner-amd64: force_pull=true so a missing job image self-heals
The dind data root was emptied out of band (most likely a hand rm -rf
during the Forgejo 503 fix at ~22:34 UTC on 2026-09-18), which wiped
node:20-bullseye from the docker:27-dind sidecar's imagedb. With
force_pull unset (default false) act_runner treats a failed pull as
best-effort and the job dies in 2s with 'No such image' - a silent
failure no workflow can see or fix.

Setting force_pull: true under container: makes each job verify/re-pull
node:20-bullseye. Trade-off: one manifest check per job, and a Docker
Hub outage would then fail jobs a warm local image could have served.
node:20-bullseye is required regardless (actions/checkout is a JS action)
so we do not change the job image to dodge this.

Evidence: ConfigMap forgejo-runner-config amd64.toml had no force_pull
(key confirmed via kubectl on the Pi). The stale Error pod
forgejo-runner-amd64-59fbb7bfc4-rj2jp (6d17h, 0/2 containers) is left
for a separate cleanup card - it sits on a different overlay and is not
the cause, but should be gc'd.

Co-authored-by: Hermes Agent <[email protected]>
2026-09-18 20:48:50 -04:00
Sirius DevOps
c03c23bc4c
cillium gateway config switch to linode node as gateway 2026-09-14 23:47:48 -04:00
Sirius DevOps
4b0303a58d forgejo arm64 runner: capacity 1
ci.yml builds every test job's Rust target into one shared named volume
(onionwire-target-ci at /target). Two jobs writing it concurrently clobber each
other's freshly-linked binaries, which then fail with 'could not execute
process ... (never executed) Permission denied (os error 13)'. Forgejo's
concurrency.group did not serialize two same-group runs (446+447 overlapped),
so capacity 1 is the enforced serializer. Cleared the corrupted volume.
2026-09-12 01:48:10 -04:00
Sirius DevOps
a3a2c600d6 forgejo amd64 runner: capacity 1 and dockerd --mtu=1420
Two concurrent x86_64 builds on the dind daemon made the second one's egress
fail (apt looping on Ign: for Debian InRelease) while a single build on the
same daemon succeeded. Serialize the amd64 runner, and match the docker bridge
MTU to the pod's 1420 so containers stop assuming a 1500-byte path.
2026-09-12 01:25:51 -04:00