Commit graph

255 commits

Author SHA1 Message Date
8271015a16
Migrate k8s 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:39:01 -05:00
24796f98d4
Optimize prod: scale deployment, drop expensive metric queries, fix slow callsign and nearby-stations queries
- k8s: 2 replicas, POOL_SIZE 25, cpu 2000m, mem 1Gi (was 1 replica, 5, 500m, 512Mi)
- telemetry poller 10s -> 60s; drop pg_database_size, pg_stat_statements,
  pg_table_size and pg_indexes_size (these were ~7100s of cumulative DB time
  on their own)
- get_latest_packet_for_callsign: bound by :packet_retention_days so partition
  pruning kicks in
- get_nearby_stations_knn: ST_DWithin spatial pre-filter (default 500km) so
  the GiST geography index cuts candidates before DISTINCT ON sort
  (EXPLAIN: 5793ms -> 400ms)
- New migration: partial functional indexes on upper(object_name) and
  upper(item_name), built per-partition CONCURRENTLY then attached to parent.
  Lets get_latest_packet_for_callsign use BitmapOr across all 3 upper()
  indexes instead of falling back to a scan
2026-05-12 17:48:58 -05:00
51e068f3f1
Add PromEx Prometheus exporter and /metrics endpoint
Wire up prom_ex with built-in Application, Beam, Phoenix, PhoenixLiveView,
and Ecto plugins, plus a custom plugin that exposes the existing
app-specific telemetry (packet pipeline, spatial PubSub, repo pool,
postgres stats, insert optimizer) as Prometheus metrics.

Mount PromEx.Plug at /metrics — internal-only, intended to be scraped
by the cluster's external Prometheus through the kube-apiserver pod
proxy. K8s pod template now carries prometheus.io/{scrape,port,path}
annotations so the existing kubernetes-pods scrape job picks it up
automatically.

PromEx is disabled in the test environment.

Also harden the packet cleanup and partition manager tests with
Repo.delete_all setup hooks so they aren't poisoned by residual rows
committed outside a sandbox transaction in earlier runs (which were
inflating delete counts and triggering ATTACH PARTITION check_violation
errors against packets_default).
2026-05-08 10:41:06 -05:00
8c8f7a0ac7
move registry + repo refs to codeberg.org/gmcintire/aprs.me 2026-05-05 12:07:31 -05:00
0cd549652d
k8s: ensure zero-downtime deploys with 1 replica
- maxSurge: 1 (explicit integer, avoid percentage rounding)
- minReadySeconds: 30 (was 10) — new pod must be stable longer before old is killed
- progressDeadlineSeconds: 600 — detect stuck rollouts
- readinessProbe failureThreshold: 3 (was 2) — more tolerance after old pod is gone
- Add PodDisruptionBudget minAvailable: 1 — prevents voluntary disruptions from dropping below 1 pod
2026-04-29 13:55:27 -05:00
FluxCD
d87eeab375 chore: update aprs.me image to git.mcintire.me/graham/aprs.me:main-1777477809-208401e [skip ci] 2026-04-29 15:53:08 +00:00
FluxCD
15c44c45bc chore: update aprs.me image to git.mcintire.me/graham/aprs.me:main-1777477694-24d353c [skip ci] 2026-04-29 15:48:21 +00:00
FluxCD
48f7f48abb chore: update aprs.me image to git.mcintire.me/graham/aprs.me:main-1777476137-6a22d2e [skip ci] 2026-04-29 15:22:32 +00:00
6a22d2e457
pin image to last-built tag main-1776451638-5ab2ffc
The previous commit referenced an image tag that was never pushed to the registry,
breaking deploys. Pin to the last working tag until CI produces a new build.
2026-04-29 10:21:54 -05:00
8cea244ea5
Revert "Reapply "ci: deploy via rollout restart instead of git-commit image bumps""
This reverts commit 40ad86b49e.
2026-04-28 15:05:36 -05:00
40ad86b49e
Reapply "ci: deploy via rollout restart instead of git-commit image bumps"
This reverts commit 0625438700.
2026-04-28 15:04:15 -05:00
FluxCD
a949d4e08d chore: update aprs.me image to git.mcintire.me/graham/aprs.me:main-1777404332-0625438 [skip ci] 2026-04-28 19:25:39 +00:00
0625438700
Revert "ci: deploy via rollout restart instead of git-commit image bumps"
This reverts commit f093b1bb4b.
2026-04-28 14:24:53 -05:00
f093b1bb4b
ci: deploy via rollout restart instead of git-commit image bumps
Switch deployment to floating :main tag with imagePullPolicy: Always
and have CI trigger a rollout restart directly via kubectl. Removes
the [skip ci] image-bump commits from main's history.

Requires a KUBECONFIG_DATA secret (base64-encoded kubeconfig with
permission to restart deployment/aprs in the aprs namespace) in
Forgejo Actions.
2026-04-28 14:22:04 -05:00
FluxCD
61fa83b3c4 chore: update aprs.me image to git.mcintire.me/graham/aprs.me:main-1777403979-3f2e025 [skip ci] 2026-04-28 19:20:54 +00:00
FluxCD
64f464e782 chore: update aprs.me image to git.mcintire.me/graham/aprs.me:main-1777312679-e590956 [skip ci] 2026-04-27 18:02:09 +00:00
FluxCD
a3ead3f941 chore: update aprs.me image to git.mcintire.me/graham/aprs.me:main-1777301232-f005a1a [skip ci] 2026-04-27 14:49:56 +00:00
FluxCD
5e277ddb9d chore: update aprs.me image to git.mcintire.me/graham/aprs.me:main-1777075248-ec0a64c [skip ci] 2026-04-25 00:01:15 +00:00
FluxCD
fa0eb7704b chore: update aprs.me image to git.mcintire.me/graham/aprs.me:main-1777053882-a377847 [skip ci] 2026-04-24 18:05:48 +00:00
FluxCD
5524f7be68 chore: update aprs.me image to git.mcintire.me/graham/aprs.me:main-1777042745-a4fed06 [skip ci] 2026-04-24 14:59:10 +00:00
FluxCD
8af9300469 chore: update aprs.me image to git.mcintire.me/graham/aprs.me:main-1777042654-145ff5f [skip ci] 2026-04-24 14:57:39 +00:00
FluxCD
ef630f2712 chore: update aprs.me image to git.mcintire.me/graham/aprs.me:main-1777042413-a1f88c4 [skip ci] 2026-04-24 14:53:38 +00:00
FluxCD
97cbe8cf6f chore: update aprs.me image to git.mcintire.me/graham/aprs.me:main-1777042295-4a4e25c [skip ci] 2026-04-24 14:51:41 +00:00
FluxCD
0994b4d2f8 chore: update aprs.me image to git.mcintire.me/graham/aprs.me:main-1777042104-2a69499 [skip ci] 2026-04-24 14:48:29 +00:00
FluxCD
4096dbf82d chore: update aprs.me image to git.mcintire.me/graham/aprs.me:main-1777041532-84a61bd [skip ci] 2026-04-24 14:38:58 +00:00
FluxCD
340707ebf9 chore: update aprs.me image to git.mcintire.me/graham/aprs.me:main-1777039907-3c5447e [skip ci] 2026-04-24 14:11:55 +00:00
FluxCD
2352a7ef9e chore: update aprs.me image to git.mcintire.me/graham/aprs.me:main-1777039685-4875904 [skip ci] 2026-04-24 14:09:17 +00:00
FluxCD
f421cf7b13 chore: update aprs.me image to git.mcintire.me/graham/aprs.me:main-1777039440-e3a6a82 [skip ci] 2026-04-24 14:04:08 +00:00
FluxCD
247c77a177 chore: update aprs.me image to git.mcintire.me/graham/aprs.me:main-1777039336-cde015d [skip ci] 2026-04-24 14:02:23 +00:00
FluxCD
b8bbfaaaaa chore: update aprs.me image to git.mcintire.me/graham/aprs.me:main-1777039212-dcb759e [skip ci] 2026-04-24 14:00:24 +00:00
FluxCD
b3f5b98a70 chore: update aprs.me image to git.mcintire.me/graham/aprs.me:main-1777039155-bd3f5c0 [skip ci] 2026-04-24 13:59:30 +00:00
FluxCD
4f41b4106c chore: update aprs.me image to git.mcintire.me/graham/aprs.me:main-1777039061-4ea38c0 [skip ci] 2026-04-24 13:57:51 +00:00
FluxCD
509b859b0d chore: update aprs.me image to git.mcintire.me/graham/aprs.me:main-1777038917-d01a15e [skip ci] 2026-04-24 13:55:44 +00:00
FluxCD
519796de5d chore: update aprs.me image to git.mcintire.me/graham/aprs.me:main-1777038648-eb6801c [skip ci] 2026-04-24 13:50:53 +00:00
FluxCD
f49473e6cd chore: update aprs.me image to git.mcintire.me/graham/aprs.me:main-1777038611-8be2fb5 [skip ci] 2026-04-24 13:50:17 +00:00
FluxCD
f4453078ae chore: update aprs.me image to git.mcintire.me/graham/aprs.me:main-1777038555-d890ec1 [skip ci] 2026-04-24 13:49:22 +00:00
FluxCD
ed44a8c0d9 chore: update aprs.me image to git.mcintire.me/graham/aprs.me:main-1777038421-a964791 [skip ci] 2026-04-24 13:47:07 +00:00
FluxCD
2446f010f8 chore: update aprs.me image to git.mcintire.me/graham/aprs.me:main-1777038312-1b8d359 [skip ci] 2026-04-24 13:45:17 +00:00
FluxCD
d02178d417 chore: update aprs.me image to git.mcintire.me/graham/aprs.me:main-1777038269-dc1b9d8 [skip ci] 2026-04-24 13:44:34 +00:00
FluxCD
6afeb7a815 chore: update aprs.me image to git.mcintire.me/graham/aprs.me:main-1777038141-15684dd [skip ci] 2026-04-24 13:42:26 +00:00
FluxCD
84cc6c6395 chore: update aprs.me image to git.mcintire.me/graham/aprs.me:main-1777038084-c9ce044 [skip ci] 2026-04-24 13:41:30 +00:00
FluxCD
a039ff2561 chore: update aprs.me image to git.mcintire.me/graham/aprs.me:main-1777037856-0d4beeb [skip ci] 2026-04-24 13:37:42 +00:00
FluxCD
3e71693f92 chore: update aprs.me image to git.mcintire.me/graham/aprs.me:main-1777037720-54c3e9f [skip ci] 2026-04-24 13:35:25 +00:00
FluxCD
cdbe3ccf46 chore: update aprs.me image to git.mcintire.me/graham/aprs.me:main-1777037670-881e0dc [skip ci] 2026-04-24 13:34:35 +00:00
FluxCD
f7348f1638 chore: update aprs.me image to git.mcintire.me/graham/aprs.me:main-1777037574-c264a9b [skip ci] 2026-04-24 13:32:59 +00:00
FluxCD
c8a182a3b9 chore: update aprs.me image to git.mcintire.me/graham/aprs.me:main-1777037514-1524497 [skip ci] 2026-04-24 13:31:59 +00:00
FluxCD
9cdc981bfb chore: update aprs.me image to git.mcintire.me/graham/aprs.me:main-1777037379-d1ca6d3 [skip ci] 2026-04-24 13:29:45 +00:00
FluxCD
75b08cb997 chore: update aprs.me image to git.mcintire.me/graham/aprs.me:main-1777037317-eeaf9dc [skip ci] 2026-04-24 13:28:42 +00:00
FluxCD
0f40dad983 chore: update aprs.me image to git.mcintire.me/graham/aprs.me:main-1777037160-3887712 [skip ci] 2026-04-24 13:26:05 +00:00
FluxCD
b2d4403f14 chore: update aprs.me image to git.mcintire.me/graham/aprs.me:main-1777037057-cb12796 [skip ci] 2026-04-24 13:24:23 +00:00