Commit Graph

137 Commits

Author SHA1 Message Date
gitea 9d44c8f93a feat(dane): udział z bazami zapisywalny — ekran zarządzania plikami (DAN-27)
Ekran „Pliki" pozwala wgrywać bazy, archiwizować je i (dla administratora)
kasować, a stan użycia jest klikany, więc musi przetrwać restart poda. Warstwa
danych musi zatem móc pisać na udziale — dotąd był montowany read-only.

ŚWIADOMY KOSZT: znika jedna warstwa obrony w głąb. Przejęcie warstwy danych
pozwala teraz nie tylko odczytać bazy, ale i je zmienić. Zostaje reszta: token
międzywarstwowy, szyfrowane łącze, ograniczenie eksportu NFS do konkretnych
hostów (DAN-25) oraz to, że kasować może wyłącznie konto administracyjne (PRE-27).

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-09 09:46:28 +00:00
argocd-image-updater 0fa09c8fe6 build: automatic update of astrololo
updates image gitea/astrololo-render tag 'aec3f843' to 'latest'
2026-08-09 09:36:15 +00:00
gitea aff4de4e49 fix(prezentacja): osobny udział na stan zamiast subPath na udziale z bazami
Pod presentation nie wstawał: CreateContainerConfigError, „failed to create
subPath directory for volumeMount state".

MÓJ BŁĄD, NIE ZAGADKA. Udział z bazami jest wyeksportowany `ro: true`
z `root_squash` — ustawiłem to runbookiem DAN-25 i sam tam napisałem ostrzeżenie,
że po tej zmianie nikt nic nie wgra. Dokładając wolumen na konta zmieniłem
`readOnly` przy MONTOWANIU w podzie i uznałem sprawę za załatwioną, nie sprawdzając
eksportu po stronie serwera.

Przyczyna była zresztą podwójna i za każdym razem ta sama:
  1. kubelet nie mógł utworzyć podkatalogu, bo udział jest tylko do odczytu,
  2. a gdyby nawet mógł — kontenery działają jako root, a root_squash mapuje
     roota na nobody, więc aplikacja i tak nie zapisałaby tam pliku kont.

ROZWIĄZANIE BEZ RUSZANIA DAN-25: osobny, mały udział /mnt/Tank1/astrololo-state,
zapisywalny, zawężony do tych samych trzech węzłów, z mapall_user na
nieuprzywilejowanego użytkownika (bezpieczniejsze niż no_root_squash, bo nie
oddaje roota). Udział z bazami ZOSTAJE tylko do odczytu.

Przy okazji znika subPath, czyli znika potrzeba, żeby kubelet cokolwiek zakładał —
katalog istnieje, bo jest korzeniem udziału.

Runbook README-stan-prezentacji.md zawiera test zapisu Z WĘZŁA do wykonania PRZED
wdrożeniem — dokładnie ten, którego zabrakło za pierwszym razem.

UWAGA: DAN-27 (zarządzanie plikami baz) uderzy w tę samą ścianę, bo wymaga zapisu
do udziału z BAZAMI. Ten commit tego nie rozwiązuje i celowo nie rusza DAN-25 —
to osobna decyzja, opisana na końcu runbooka.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-07 17:46:12 +02:00
argocd-image-updater ef837146af build: automatic update of astrololo
updates image gitea/astrololo-presentation tag 'baf4e0e3' to 'a8339659'
2026-08-07 13:55:15 +00:00
gitea 2e0fe2a9be feat(prezentacja): wolumen na konta zakładane z aplikacji (PRE-27)
Ekran „Konta" zapisuje konta do pliku, więc prezentacja potrzebuje trwałego
miejsca — inaczej wszystkie konta znikałyby przy restarcie poda.

subPath, NIE cały udział: prezentacja dostaje wyłącznie własny podkatalog
`presentation-state` i nie widzi baz interpretacyjnych. Zamontowanie tu całego
/mnt/Tank1/astrololo dałoby jej wgląd w bazy i obeszłoby bokiem zamknięcie
dostępu z DAN-25.

Konto administracyjne zostaje w APP_USER/APP_PASSWORD z sekretu — celowo poza
plikiem, żeby nie dało się go skasować ani ograniczyć z aplikacji.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-07 12:17:39 +00:00
argocd-image-updater 2ea4b70d27 build: automatic update of astrololo
updates image gitea/astrololo-data tag 'aec3f843' to 'baf4e0e3'
updates image gitea/astrololo-logic tag '8b6ecc72' to 'baf4e0e3'
updates image gitea/astrololo-presentation tag '8b6ecc72' to 'baf4e0e3'
2026-08-06 20:46:03 +00:00
argocd-image-updater de1293416f build: automatic update of astrololo
updates image gitea/astrololo-logic tag '21a00b00' to '8b6ecc72'
updates image gitea/astrololo-presentation tag '4d1daab3' to '8b6ecc72'
2026-08-06 14:24:09 +00:00
argocd-image-updater 48936ad289 build: automatic update of astrololo
updates image gitea/astrololo-logic tag '4d1daab3' to '21a00b00'
2026-08-06 11:43:28 +00:00
argocd-image-updater e5d5f2cab1 build: automatic update of astrololo
updates image gitea/astrololo-logic tag 'aec3f843' to '4d1daab3'
updates image gitea/astrololo-presentation tag 'aec3f843' to '4d1daab3'
2026-08-06 10:11:05 +00:00
argocd-image-updater ad0abb90e9 build: automatic update of astrololo
updates image gitea/astrololo-data tag '40f5e459' to 'aec3f843'
updates image gitea/astrololo-logic tag '1be57a47' to 'aec3f843'
updates image gitea/astrololo-presentation tag '40f5e459' to 'aec3f843'
updates image gitea/astrololo-render tag 'latest' to 'aec3f843'
2026-08-05 23:01:57 +00:00
argocd-image-updater 38c3cd3c4b build: automatic update of astrololo
updates image gitea/astrololo-data tag '40f5e459' to 'aec3f843'
updates image gitea/astrololo-render tag 'latest' to 'aec3f843'
2026-08-05 22:59:48 +00:00
argocd-image-updater 51f71a1292 build: automatic update of astrololo
updates image gitea/astrololo-logic tag '40f5e459' to '1be57a47'
2026-08-05 17:51:11 +00:00
argocd-image-updater 0ecd3de119 build: automatic update of astrololo
updates image gitea/astrololo-data tag 'e3114f3e' to '40f5e459'
updates image gitea/astrololo-logic tag '86a0f16f' to '40f5e459'
updates image gitea/astrololo-presentation tag 'e3114f3e' to '40f5e459'
2026-08-05 10:13:25 +00:00
argocd-image-updater aaff9d6b3a build: automatic update of astrololo
updates image gitea/astrololo-data tag 'e3114f3e' to '40f5e459'
2026-08-05 10:11:22 +00:00
argocd-image-updater cb5315e4e5 build: automatic update of astrololo
updates image gitea/astrololo-logic tag 'e3114f3e' to '86a0f16f'
2026-08-04 20:30:28 +00:00
argocd-image-updater ef37a3f628 build: automatic update of astrololo
updates image gitea/astrololo-data tag 'bc80745a' to 'e3114f3e'
updates image gitea/astrololo-logic tag 'bc80745a' to 'e3114f3e'
updates image gitea/astrololo-presentation tag 'bc80745a' to 'e3114f3e'
2026-08-04 17:55:48 +00:00
argocd-image-updater 8222129d71 build: automatic update of astrololo
updates image gitea/astrololo-data tag '70c83cfc' to 'bc80745a'
updates image gitea/astrololo-logic tag '70c83cfc' to 'bc80745a'
updates image gitea/astrololo-presentation tag '70c83cfc' to 'bc80745a'
2026-08-04 16:25:17 +00:00
gitea abc0f98034 sec(astrololo): pody bez tokenu konta serwisowego (LOG-33)
Wszystkie cztery usługi biegły na koncie `default` z AUTOMATYCZNIE montowanym
tokenem API Kubernetesa. Żadna z nich nie rozmawia z API klastra — sekrety dostają
przez `secretKeyRef`, który wstrzykuje kubelet, nie pod. Token był więc zbędny,
a leżał w każdym kontenerze jako gotowy punkt wyjścia do klastra dla kogoś, kto
przejmie proces (np. przez lukę w zależności).

`automountServiceAccountToken: false` w szablonie poda data/logic/presentation/
render. Zweryfikowane `kubectl kustomize` — pole trafia do `.spec.template.spec`,
nie do specu Deploymentu (tam byłoby ciche i bez efektu).

Zero wpływu na działanie: nic w kodzie nie woła API Kubernetesa.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-08-04 17:08:39 +02:00
argocd-image-updater 71b9fe0842 build: automatic update of conjurer
updates image gitea/conjurer-librarian tag '9f22dbf9' to 'ae1bd677'
2026-08-04 13:18:01 +00:00
argocd-image-updater 261b41240d build: automatic update of conjurer
updates image gitea/conjurer-librarian tag 'fbd1ec9f' to '9f22dbf9'
2026-08-04 11:43:36 +00:00
argocd-image-updater de4d41808a build: automatic update of astrololo
updates image gitea/astrololo-data tag '4c1e7f88' to '70c83cfc'
updates image gitea/astrololo-logic tag '4c1e7f88' to '70c83cfc'
updates image gitea/astrololo-presentation tag '4c1e7f88' to '70c83cfc'
2026-08-04 10:59:11 +00:00
argocd-image-updater b9289c4f8c build: automatic update of astrololo
updates image gitea/astrololo-data tag 'dd32f7e8' to '4c1e7f88'
updates image gitea/astrololo-logic tag 'dd32f7e8' to '4c1e7f88'
updates image gitea/astrololo-presentation tag 'd3d9b365' to '4c1e7f88'
2026-08-04 10:29:00 +00:00
argocd-image-updater 536b2bbbbb build: automatic update of astrololo
updates image gitea/astrololo-presentation tag 'dd32f7e8' to 'd3d9b365'
2026-08-03 23:04:28 +00:00
argocd-image-updater e2af5e331e build: automatic update of astrololo
updates image gitea/astrololo-data tag '78af6d47' to 'dd32f7e8'
updates image gitea/astrololo-logic tag '7b435d42' to 'dd32f7e8'
updates image gitea/astrololo-presentation tag '7b435d42' to 'dd32f7e8'
2026-08-03 22:34:20 +00:00
argocd-image-updater 1a02704422 build: automatic update of astrololo
updates image gitea/astrololo-data tag 'b36b3bee' to '78af6d47'
2026-08-03 20:33:52 +00:00
argocd-image-updater 91890b701e build: automatic update of astrololo
updates image gitea/astrololo-logic tag 'b36b3bee' to '7b435d42'
updates image gitea/astrololo-presentation tag 'a9f2a038' to '7b435d42'
2026-08-03 19:38:53 +00:00
gitea 597cbd40f8 conjurer: deploy bot on its own [deploy]-gated image channel
The production bot now tracks conjurer-bot-deploy instead of conjurer-bot,
so it updates only when the conjurer CI promotes a build (commit message
contains [deploy]). Adds the image-updater 'deploy-bot' alias and the
kustomization images entry for it; DEPLOY-BOT.md documents the channel and
the one-time bootstrap. Test bot + librarian keep tracking every build.

Pairs with conjurer#20 (the CI promotion step).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-08-03 21:11:36 +02:00
argocd-image-updater 6983814a5c build: automatic update of conjurer
updates image gitea/conjurer-librarian tag 'f4dea535' to 'fbd1ec9f'
updates image gitea/conjurer-bot tag 'f4dea535' to 'fbd1ec9f'
2026-08-03 18:46:40 +00:00
argocd-image-updater cc3c2b512d build: automatic update of conjurer
updates image gitea/conjurer-librarian tag 'd4c6d78c' to 'f4dea535'
updates image gitea/conjurer-bot tag 'd4c6d78c' to 'f4dea535'
2026-08-03 18:38:32 +00:00
argocd-image-updater 4d8ca6f4fd build: automatic update of conjurer
updates image gitea/conjurer-bot tag 'ac16b77f' to 'd4c6d78c'
2026-08-03 17:50:23 +00:00
argocd-image-updater 311d5ae071 build: automatic update of conjurer
updates image gitea/conjurer-librarian tag 'ac16b77f' to 'd4c6d78c'
2026-08-03 17:48:20 +00:00
gitea 5b6040c60d conjurer: add CONJURER_SELF_CALLBACK to both bots (per-origin librarian answers)
Pairs with conjurer#18: each bot advertises its own callback so the shared
librarian answers results/pongs back to the bot that asked - test bot
http://192.168.1.73:32442, deploy bot :32443. No CONJURER_MAIN_BOT
repointing needed for the librarian anymore; DEPLOY-BOT.md updated (only
the musician stays single-target).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-08-03 17:47:32 +00:00
gitea 358356a1b1 conjurer: add production ('deploy') bot + data seeding/backup
A second Conjurer bot alongside the test one, sharing librarian/musician/
radio and the API key, differing only in:
 * Discord token from the deploy-conjurer-netrc secret,
 * distinct names/labels (deploy-bot) and NodePort 32443,
 * /data on an NFS export (RWX) instead of a block PVC - so config/state
   can be uploaded while it runs (copy onto the share) and backed up
   concurrently.

deploy-bot-backup: a daily CronJob that mirrors /data and keeps 30 days of
dated snapshots of the critical small state (both memories, settings,
accident log, transcripts) on NFS. Production only - the test bot's
amnesia is fine. DEPLOY-BOT.md documents seeding, backup/restore, and the
librarian/musician callback routing (they push to one bot; repoint
CONJURER_MAIN_BOT to :32443 to feed this one).

kubectl kustomize builds cleanly (10 objects).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-08-03 17:47:32 +00:00
argocd-image-updater 71133be104 build: automatic update of astrololo
updates image gitea/astrololo-presentation tag 'b36b3bee' to 'a9f2a038'
2026-08-03 16:52:05 +00:00
argocd-image-updater 05107b57de build: automatic update of astrololo
updates image gitea/astrololo-data tag 'a0d1135d' to 'b36b3bee'
updates image gitea/astrololo-logic tag 'a0d1135d' to 'b36b3bee'
updates image gitea/astrololo-presentation tag 'a0d1135d' to 'b36b3bee'
2026-08-03 15:47:48 +00:00
argocd-image-updater 630ce61be3 build: automatic update of conjurer
updates image gitea/conjurer-librarian tag 'c5643aa2' to 'ac16b77f'
updates image gitea/conjurer-bot tag 'c5643aa2' to 'ac16b77f'
2026-08-03 15:45:49 +00:00
argocd-image-updater a268cd392c build: automatic update of astrololo
updates image gitea/astrololo-data tag 'a0d1135d' to 'b36b3bee'
updates image gitea/astrololo-logic tag 'a0d1135d' to 'b36b3bee'
2026-08-03 15:45:46 +00:00
argocd-image-updater 056ebce791 build: automatic update of conjurer
updates image gitea/conjurer-librarian tag '40605b95' to 'c5643aa2'
updates image gitea/conjurer-bot tag '8e18071b' to 'c5643aa2'
2026-08-03 15:43:47 +00:00
gitea a7cab0acd7 conjurer: give librarian 60s termination grace for checkpointing
The librarian now checkpoints an in-progress search on SIGTERM and exits
within CONJURER_LIBRARIAN_GRACEFUL_TIMEOUT (default 45s). Raise k8s
terminationGracePeriodSeconds to 60 so that graceful checkpoint isn't cut
short by SIGKILL - otherwise the long DB scan restarts instead of resuming.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-08-03 15:42:10 +00:00
argocd-image-updater 87048cdbc4 build: automatic update of astrololo
updates image gitea/astrololo-data tag '8ebce816' to 'a0d1135d'
updates image gitea/astrololo-logic tag '8ebce816' to 'a0d1135d'
updates image gitea/astrololo-presentation tag '8ebce816' to 'a0d1135d'
2026-08-03 11:06:43 +00:00
argocd-image-updater 7a33250d98 build: automatic update of conjurer
updates image gitea/conjurer-librarian tag '8e18071b' to '40605b95'
2026-08-02 17:39:36 +00:00
gitea d94ad4a0dc conjurer: bump librarian memory limit 1Gi -> 2Gi (headroom)
The work-queue OOM is fixed in code (bounded queue), but a deep search
still loads up to 15000 Crossref records and the accumulating result
JSONs into RAM. Give 2Gi of headroom so a big search isn't OOM-killed;
raise the request to 512Mi to match its real baseline.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-08-02 19:36:14 +02:00
argocd-image-updater 791e745865 build: automatic update of conjurer
updates image gitea/conjurer-librarian tag '44b7298a' to '8e18071b'
updates image gitea/conjurer-bot tag '44b7298a' to '8e18071b'
2026-08-02 17:05:31 +00:00
argocd-image-updater 9fa72af1bf build: automatic update of conjurer
updates image gitea/conjurer-librarian tag '44b7298a' to '8ac68df1'
updates image gitea/conjurer-bot tag '44b7298a' to '8ac68df1'
2026-08-02 17:03:28 +00:00
argocd-image-updater abbba17dd0 build: automatic update of conjurer
updates image gitea/conjurer-librarian tag '5d321f2f' to '44b7298a'
updates image gitea/conjurer-bot tag '5d321f2f' to '44b7298a'
2026-08-02 15:33:09 +00:00
gitea b7f226062c conjurer: napraw drogę powrotną librarian/musician -> bot
Wyniki wyszukań (librarian) i eventy 'now playing' (musician) POST-owane do
bota ginęły, bo droga powrotna do bota była krucha:

* Service 'bot' był NodePort BEZ przypiętego nodePort -> k8s losował port z
  30000-32767 przy każdym (od)tworzeniu Service, a musician/betoniarka z
  Dockera adresują bota na sztywno http://192.168.1.73:32442. Rozjazd = każdy
  POST leci w zamknięty port. Przypinam nodePort: 32442.
* Librarian jest w tym samym klastrze co bot, a mimo to szedł przez nodePort
  węzła. Przełączam na DNS Service'u http://bot:5000 - odporne na
  przetasowania nodePortu (nodePort zostaje tylko dla zewnętrznych z Dockera).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-08-02 17:04:57 +02:00
gitea d84b982e0f fx 2026-08-01 20:44:00 +02:00
argocd-image-updater 83f928c278 build: automatic update of conjurer
updates image gitea/conjurer-bot tag 'defc482a' to '5d321f2f'
2026-08-01 17:16:14 +00:00
argocd-image-updater a0330b0b77 build: automatic update of conjurer
updates image gitea/conjurer-librarian tag 'defc482a' to '5d321f2f'
2026-08-01 17:14:12 +00:00
gitea e33d59b70c fx 2026-08-01 14:33:17 +02:00