Commit graph

554 commits

Author SHA1 Message Date
ab23031761 Migrate images from codeberg.org to git.mcintire.me
Some checks failed
Build and Push / Build and Push Docker Image (push) Failing after 2s
2026-07-24 14:38:54 -05:00
9369257ed3 Migrate images from codeberg.org to git.mcintire.me
Some checks are pending
Build and Push / Build and Push Docker Image (push) Waiting to run
2026-07-24 14:38:53 -05:00
5bb79746a4 Migrate images from codeberg.org to git.mcintire.me
Some checks are pending
Build and Push / Build and Push Docker Image (push) Waiting to run
2026-07-24 14:38:53 -05:00
0b1bc6ae24 Migrate images from codeberg.org to git.mcintire.me
Some checks are pending
Build and Push / Build and Push Docker Image (push) Waiting to run
2026-07-24 14:38:52 -05:00
Graham McInitre
c193f35a0c k8s/argo optimizations 2026-07-21 12:14:01 -05:00
Graham McInitre
d3a7cfe733 fix: replace stale Flux reference with ArgoCD in kustomization.yaml 2026-07-21 08:44:19 -05:00
Graham McInitre
b9aac1b210 update for ip changes 2026-07-20 09:01:36 -05:00
b8eea1bd45
prom: wire rust workers into prometheus
prop-grid-rs already exposed prop_grid_rs_chain_step_duration_seconds
+ tasks_in_flight on :9100 but the comment still pointed at the old
prom server (10.0.15.25). hrrr-point-rs had no metrics listener at all.

- metrics.rs: new POINT_BATCH_DURATION / POINT_BATCHES_TOTAL /
  POINTS_PROCESSED_TOTAL series + record_point_batch helper, plus unit
  tests serialized via a static Mutex (the prometheus crate's global
  registry races otherwise)
- hrrr_point_worker.rs: spawn metrics::serve on METRICS_ADDR (default
  0.0.0.0:9100), wrap process_batch in InFlightGuard, record outcome +
  per-point counts on every batch
- deployment-hrrr-point-rs.yaml: prometheus.io/{scrape,port,path,job}
  annotations, METRICS_ADDR env, ports.metrics, /health readiness probe
- deployment-grid-rs.yaml: refresh stale 10.0.15.25 comment, add
  prometheus.io/job for clean dashboard up{} selectors

Also fix Microwaveprop.PromExTest: `assert plugins != []` triggered
Elixir 1.19 type-checker warning ("non_empty_list != empty_list always
true"); replaced with membership assertions for the InstrumentPlugin +
Plugins.Beam.
2026-05-08 10:36:49 -05:00
abb7e90d2d
prom: annotate hot pods for k8s-pods scrape via apiserver proxy
External Prometheus at 10.0.15.31 already runs the kubernetes-pods job
in prometheus.yml.j2; pods need prometheus.io/scrape + port + path +
job annotations to be picked up. The prop-metrics NodePort selector
also tightened to tier=hot so backfill (PHX_SERVER=false, no :5000
listener) is excluded from the scrape pool.
2026-05-08 10:23:30 -05:00
38cf1336b7
chore(k8s): point deployments at codeberg.org images
The image tags here are placeholders — the live tag is set by the
ArgoCD Application's spec.source.kustomize.images field, same as
before. Only the registry hostname and path changed.

Pull secret 'forgejo-registry' in the prop namespace now carries
both git.mcintire.me and codeberg.org auths during the transition.
2026-05-05 10:38:47 -05:00
c9aa9c53d5
ops: prop deployment floor at 2 replicas, surge to 4
A single-pod floor meant any pod restart (rolling deploy mid-run,
OOM kill, node drain) took the whole site down for the boot window.
Bump HPA to minReplicas: 2 / maxReplicas: 4 so the floor is HA and
load surges (LiveView traffic coinciding with the hourly propagation
chain) still get headroom. Combined with the existing rolling-update
strategy (maxSurge: 1, maxUnavailable: 0) this means deploys go
2 -> 3 -> 2 with zero downtime.
2026-05-03 15:06:37 -05:00
5e9513bf02
ops(prop): aggressive HPA scale-down + CLAUDE.md guardrails
HPA: prop-grid-rs and hrrr-point-rs were sitting at 4 pods for
~16 min after the hourly chain spike — 10-min scaleDown stabilization
window plus a 1-pod-per-2-min drain policy. Both deployments stayed
visibly over-provisioned even when CPU dropped to 1m/pod.

Tighten scale-down to: 2-min stabilization (long enough that a real
multi-cycle surge doesn't immediately collapse) + Percent: 100 per
60s drain (back to min=1 within 1 minute of stabilization clearing).
Net: spike → scale up to handle queue (unchanged) → back to 1 pod
within ~3 min of spike ending. scaleUp left untouched.

CLAUDE.md updates so this doesn't bite again:

- Document `cargo clippy --all-targets -- -D warnings` as part of
  the local Rust precommit ritual. The HRDPS commits in this branch
  passed `cargo build` locally but failed CI on lints (manual_range_
  contains, iter_kv_map). Adding the recipe under Commands plus a
  Rust subsection in Key Conventions so future Rust touches don't
  ship clippy regressions.
- Added a Testing note about not anchoring relative-time fixtures on
  utc_now-truncated-to-hour — the weather_map_live one-hour-cutoff
  test (fix in 2768fc68) was a textbook example: 50% flake rate
  driven entirely by which minute of the hour the test ran in.
2026-04-29 17:44:17 -05:00
ed8b080b13
ops(prop): bump preStop sleep to 25s for cloudflared connection drain
The ingress is cloudflared (Cloudflare Tunnel), which keeps an HTTP/2
connection pool to upstream Service IPs and reuses connections
aggressively. After a pod is removed from Service endpoints,
cloudflared can still hold in-flight HTTP/2 streams to the dying pod
for a noticeable window — 10 s wasn't enough, deploys still bounced
502 on LiveView reconnect.

Bump preStop sleep 10s → 25s and terminationGracePeriodSeconds 40s →
60s so cloudflared has time to turn over its upstream connections
before Phoenix begins draining.
2026-04-29 14:17:40 -05:00
45d8466808
ops(prop): preStop sleep so Service drains before Phoenix shuts down
Deploys were causing 502 Bad Gateway on LiveView reconnect. The kubelet
sent SIGTERM to the old pod and Phoenix immediately stopped accepting
connections, but the Service endpoint controller and ingress hadn't
yet propagated the pod's removal from endpoints — the browser's
reconnect raced the endpoint update and bounced 502 against the dead
pod, then gave up.

Add a 10s preStop sleep on the container and bump
terminationGracePeriodSeconds to 40 so the load balancer has time to
drain this pod before Phoenix begins shutting down.
2026-04-29 14:13:22 -05:00
b66024e0c3
ops(prop): zero-downtime rolling update with single replica
maxUnavailable: 1 was killing the only pod before the new one was
ready, taking the site down for the entire image pull + boot window
on every deploy. Switch to maxSurge: 1 / maxUnavailable: 0 so K8s
spins up the replacement and waits for its readinessProbe to pass
before tearing down the old pod.
2026-04-29 13:50:14 -05:00
43db0fb8dd
remove obsolete flux manifest and imagepolicy annotations 2026-04-29 11:00:05 -05:00
93dd20f830
ops(prop): pin HPA to 1 replica
Set minReplicas == maxReplicas == 1 on the `prop` HPA so the cluster
runs exactly one app pod. HPA still owns the replica count (Flux
ignores spec.replicas on the Deployment), so this is the right knob —
no need to touch deployment.yaml. Restore autoscaling by raising both
bounds together.
2026-04-29 09:55:46 -05:00
388129865e
flux update 2026-04-27 12:57:20 -05:00
FluxCD
06a635e154 chore: update prop image to git.mcintire.me/graham/prop:main-1777300373-610892e [skip ci] 2026-04-27 14:40:47 +00:00
FluxCD
0cf044be30 chore: update prop image to git.mcintire.me/graham/prop:main-1777235702-fe2ecf2 [skip ci] 2026-04-26 20:39:17 +00:00
FluxCD
faa2105861 chore: update prop image to git.mcintire.me/graham/prop:main-1777235105-c0a884d [skip ci] 2026-04-26 20:32:15 +00:00
FluxCD
4b10d63e67 chore: update prop image to git.mcintire.me/graham/prop:main-1777230205-f9e3dd5 [skip ci] 2026-04-26 19:07:55 +00:00
FluxCD
df475a8199 chore: update prop image to git.mcintire.me/graham/prop:main-1777229724-f63e679 [skip ci] 2026-04-26 18:59:35 +00:00
FluxCD
18e6088aa8 chore: update prop image to git.mcintire.me/graham/prop:main-1777227978-488b968 [skip ci] 2026-04-26 18:30:28 +00:00
FluxCD
5094ea0837 chore: update prop image to git.mcintire.me/graham/prop:main-1777227067-ca142d5 [skip ci] 2026-04-26 18:15:24 +00:00
FluxCD
ac98d35330 chore: update prop image to git.mcintire.me/graham/prop:main-1777226288-7105ac6 [skip ci] 2026-04-26 18:02:20 +00:00
FluxCD
1a85a5f540 chore: update prop image to git.mcintire.me/graham/prop:main-1777225924-4f647e7 [skip ci] 2026-04-26 17:55:18 +00:00
FluxCD
87d5175c6f chore: update prop image to git.mcintire.me/graham/prop:main-1777224612-aaf3115 [skip ci] 2026-04-26 17:34:04 +00:00
FluxCD
031db7befc chore: update prop image to git.mcintire.me/graham/prop:main-1777223156-82b515e [skip ci] 2026-04-26 17:09:51 +00:00
FluxCD
88d785be50 chore: update prop image to git.mcintire.me/graham/prop:main-1777222350-5e1155f [skip ci] 2026-04-26 16:55:48 +00:00
FluxCD
5d9e9e1084 chore: update prop image to git.mcintire.me/graham/prop:main-1777222118-5a4129f [skip ci] 2026-04-26 16:52:29 +00:00
FluxCD
3b8d87c356 chore: update prop image to git.mcintire.me/graham/prop:main-1777220031-2f060b4 [skip ci] 2026-04-26 16:17:21 +00:00
FluxCD
6710140b72 chore: update prop image to git.mcintire.me/graham/prop:main-1777218902-a290c99 [skip ci] 2026-04-26 15:58:15 +00:00
FluxCD
b17ff838ca chore: update prop image to git.mcintire.me/graham/prop:main-1777218305-0f15e99 [skip ci] 2026-04-26 15:49:03 +00:00
FluxCD
a150e02cd0 chore: update prop image to git.mcintire.me/graham/prop:main-1777217856-021608d [skip ci] 2026-04-26 15:41:01 +00:00
FluxCD
ff7f369e57 chore: update prop image to git.mcintire.me/graham/prop:main-1777215438-2f46d49 [skip ci] 2026-04-26 15:00:50 +00:00
FluxCD
b2aec7e8c8 chore: update prop image to git.mcintire.me/graham/prop:main-1777213888-3b1a13b [skip ci] 2026-04-26 14:34:35 +00:00
FluxCD
6a79458ea9 chore: update prop image to git.mcintire.me/graham/prop:main-1777212762-7d80bab [skip ci] 2026-04-26 14:16:11 +00:00
FluxCD
3c877b8b8e chore: update prop image to git.mcintire.me/graham/prop:main-1777212183-2f35005 [skip ci] 2026-04-26 14:10:09 +00:00
FluxCD
ea502ee9e7 chore: update prop image to git.mcintire.me/graham/prop:main-1777158633-0d2cfb6 [skip ci] 2026-04-25 23:18:38 +00:00
FluxCD
5c178ef4b7 chore: update prop image to git.mcintire.me/graham/prop:main-1777157172-eac817c [skip ci] 2026-04-25 22:56:35 +00:00
FluxCD
819bf2e27d chore: update prop image to git.mcintire.me/graham/prop:main-1777156652-6462acf [skip ci] 2026-04-25 22:40:28 +00:00
FluxCD
c1eabb788f chore: update prop image to git.mcintire.me/graham/prop:main-1777156190-40cbb40 [skip ci] 2026-04-25 22:33:25 +00:00
FluxCD
f02a5b90e7 chore: update prop image to git.mcintire.me/graham/prop:main-1777155788-9178751 [skip ci] 2026-04-25 22:26:22 +00:00
FluxCD
9b81e776ca chore: update prop image to git.mcintire.me/graham/prop:main-1777155369-a9a3d22 [skip ci] 2026-04-25 22:18:19 +00:00
FluxCD
ea95ae3596 chore: update prop image to git.mcintire.me/graham/prop:main-1777154970-cbc20d0 [skip ci] 2026-04-25 22:12:14 +00:00
b1fe077863
fix(path): single grid decode + zero-downtime rust-worker rollouts 2026-04-25 16:57:00 -05:00
FluxCD
055be81442 chore: update prop image to git.mcintire.me/graham/prop:main-1777153931-771299c [skip ci] 2026-04-25 21:54:10 +00:00
FluxCD
4108a98e5d chore: update prop image to git.mcintire.me/graham/prop:main-1777153008-c5d6633 [skip ci] 2026-04-25 21:38:59 +00:00
FluxCD
b6fdfdf639 chore: update prop image to git.mcintire.me/graham/prop:main-1777151041-ce9319d [skip ci] 2026-04-25 21:13:54 +00:00