Commit Graph

100 Commits

Author SHA1 Message Date
gitea ff0a1c8256 docs(węzły): klient NFS jako jawny wymóg wdrożenia
Pody przestały wstawać z komunikatem „bad option ... you might need
a /sbin/mount.<type> helper program". To NIE jest problem z udziałem ani
z uprawnieniami — serwer w ogóle nie został zapytany; jądro nie znalazło programu
pomocniczego, bo na węźle brakowało nfs-common.

Wymogu klienta NFS nie było w żadnym runbooku, choć wszystkie trzy warstwy
montują udziały z NAS-a. Luka była uśpiona: wszystko stało na jednym węźle, który
klienta miał, więc braku na pozostałych nie było jak zauważyć. Ujawniło się
dopiero, gdy zejście do zera replik — przy zupełnie innej naprawie —
przeplanowało pody gdzie indziej.

Dopisana tabela odróżniająca trzy komunikaty, które łatwo pomylić, bo wszystkie
kończą się niewstającym podem: brak klienta na węźle, odmowa serwera i brak praw
do zapisu. Każdy ma inną przyczynę i inne miejsce naprawy.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-21 12:40:24 +02:00
argocd-image-updater ffeb639d62 build: automatic update of astrololo
updates image gitea/astrololo-data tag 'ee3c515d' to '71bb3b9c'
updates image gitea/astrololo-logic tag 'ee3c515d' to '71bb3b9c'
updates image gitea/astrololo-presentation tag 'ee3c515d' to '71bb3b9c'
2026-08-20 23:56:37 +00:00
argocd-image-updater 1f9ea03ca6 build: automatic update of astrololo
updates image gitea/astrololo-data tag 'ac8a0e9f' to 'ee3c515d'
updates image gitea/astrololo-logic tag 'e2b50b28' to 'ee3c515d'
updates image gitea/astrololo-presentation tag 'e2b50b28' to 'ee3c515d'
2026-08-11 14:38:44 +00:00
argocd-image-updater 466d3cb8e7 build: automatic update of astrololo
updates image gitea/astrololo-data tag 'b838cf47' to 'ac8a0e9f'
2026-08-11 13:40:38 +00:00
argocd-image-updater bd0948f7a5 build: automatic update of astrololo
updates image gitea/astrololo-data tag '003deb94' to 'b838cf47'
updates image gitea/astrololo-logic tag '003deb94' to 'e2b50b28'
updates image gitea/astrololo-presentation tag '003deb94' to 'e2b50b28'
2026-08-11 09:18:11 +00:00
argocd-image-updater ba6e3bc9ee build: automatic update of astrololo
updates image gitea/astrololo-data tag 'baf4e0e3' to '003deb94'
updates image gitea/astrololo-logic tag 'baf4e0e3' to '003deb94'
updates image gitea/astrololo-presentation tag 'a8339659' to '003deb94'
2026-08-09 15:54:27 +00:00
argocd-image-updater 02ab25e39e build: automatic update of astrololo
updates image gitea/astrololo-data tag 'baf4e0e3' to '003deb94'
updates image gitea/astrololo-logic tag 'baf4e0e3' to '003deb94'
2026-08-09 15:51:02 +00:00
gitea 94f059d090 docs(pliki): runbook otwarcia udziału z bazami na zapis (zgubiony przy merge'u)
Treść powstała jako commit na gałęzi feat/pliki-zapis JUŻ PO zmergowaniu jej
PR-a, więc nigdy nie trafiła na master — został tam wyłącznie manifest.
Sam manifest jest w porządku (readOnly zdjęte), brakowało tylko opisu, co z tym
zrobić po stronie NAS-a.

Runbook zawiera: komendy midclt otwierające udział z bazami na zapis, sprawdzenie
przez exportfs (bo konfiguracja udziału i stan eksportu to dwie różne rzeczy),
ostrzeżenie, że przeładowanie musi iść przez zero replik zamiast rollout restart,
oraz listę kontrolną po wdrożeniu — z wyszukiwaniem jako punktem NAJWAŻNIEJSZYM,
bo to jedyne miejsce, w którym ta zmiana mogłaby przejść niezauważona.

Osobno wyliczone, co świadomie tracimy: DAN-25 dawał gwarancję, że baz nie da się
zmienić przez NFS, i tych dwóch rzeczy nie da się mieć naraz.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-09 12:22:49 +02:00
gitea 99b9a0426f feat(astrololo): Postgres jako lustro baz w SQL + runbook (DAN-28)
Manifest, wpięcie w kustomization i runbook krok po kroku.

DECYZJE ZAPISANE W MANIFEŚCIE, ŻEBY NIE TRZEBA ICH BYŁO ODTWARZAĆ Z GŁOWY:

local-path, NIE NFS. Postgres zakłada semantykę blokad i fsync, której NFS nie
gwarantuje — to klasyczne źródło uszkodzenia bazy przy nagłym restarcie. Ceną
jest przywiązanie do węzła; przy luście odtwarzalnym z Excela to akceptowalne.

strategy: Recreate. Wolumen jest ReadWriteOnce, a dwa procesy Postgresa na jednym
katalogu danych to uszkodzona baza — rolling próbowałby wstać z nowym podem,
zanim stary zejdzie.

PGDATA w PODKATALOGU wolumenu: katalog główny potrafi zawierać wpisy systemu
plików, a initdb odmawia pracy w niepustym katalogu.

Wersja PRZYPIĘTA i poza image-updaterem: podbicie majora wymaga migracji katalogu
danych, więc nie może się zdarzyć samo, w nocy, przy okazji builda aplikacji.

C.UTF-8 zamiast pl_PL.UTF-8: dopasowanie tekstu robimy przez unaccent i pg_trgm,
nie przez collation, a pl_PL wymagałby obrazu z wygenerowanymi lokalizacjami.

DATA_PROVIDER zostaje na `excel`. Postgres można wdrożyć i obejrzeć BEZ ryzyka
dla działającego wyszukiwania; przełączenie to osobna, późniejsza decyzja.

SPRAWDZONE PRZED ODDANIEM: `kubectl kustomize astrololo` składa komplet 21
zasobów bez błędu, YAML parsuje się poprawnie, audyt odwołań potwierdza, że
jedynym brakującym sekretem jest astrololo-postgres (oba klucze), a DSN
postgresql+psycopg:// jest rozpoznawany przez SQLAlchemy z psycopg 3.

NIE SPRAWDZONE: skrypt inicjalizujący nie biegł przeciwko prawdziwemu Postgresowi
— na maszynie, na której to powstawało, nie ma Dockera. Zapisane wprost
w runbooku; krok 4 jest tam prawdziwym testem.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-09 12:06:10 +02:00
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 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
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 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 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 814673390f build: automatic update of astrololo
updates image gitea/astrololo-render tag '8ebce816' to 'latest'
2026-07-30 17:31:41 +00:00
argocd-image-updater 268ea8359f build: automatic update of astrololo
updates image gitea/astrololo-render tag 'latest' to '8ebce816'
2026-07-30 15:17:47 +00:00
argocd-image-updater a88148f7d3 build: automatic update of astrololo
updates image gitea/astrololo-data tag '52b7c20c' to '8ebce816'
updates image gitea/astrololo-logic tag '52b7c20c' to '8ebce816'
updates image gitea/astrololo-presentation tag '52b7c20c' to '8ebce816'
2026-07-30 15:11:39 +00:00
argocd-image-updater 7b61f2e309 build: automatic update of astrololo
updates image gitea/astrololo-logic tag '9b1e4dbb' to '52b7c20c'
updates image gitea/astrololo-presentation tag '9b1e4dbb' to '52b7c20c'
2026-07-30 15:03:35 +00:00
argocd-image-updater 48250c7015 build: automatic update of astrololo
updates image gitea/astrololo-data tag 'f5dec15e' to '52b7c20c'
2026-07-30 15:01:31 +00:00
argocd-image-updater 6524258e1c build: automatic update of astrololo
updates image gitea/astrololo-render tag '998c83b2' to 'latest'
2026-07-30 11:38:30 +00:00
argocd-image-updater 6844dd5b55 build: automatic update of astrololo
updates image gitea/astrololo-render tag 'f5dec15e' to '998c83b2'
2026-07-30 09:42:47 +00:00
argocd-image-updater 311f1b2ce1 build: automatic update of astrololo
updates image gitea/astrololo-logic tag 'f5dec15e' to '9b1e4dbb'
updates image gitea/astrololo-presentation tag '4bdfb673' to '9b1e4dbb'
2026-07-29 00:06:27 +00:00
argocd-image-updater 3bd5ba7a81 build: automatic update of astrololo
updates image gitea/astrololo-presentation tag 'f5dec15e' to '4bdfb673'
2026-07-28 23:36:09 +00:00
argocd-image-updater dda554d98c build: automatic update of astrololo
updates image gitea/astrololo-data tag '998c83b2' to 'f5dec15e'
updates image gitea/astrololo-logic tag '998c83b2' to 'f5dec15e'
updates image gitea/astrololo-presentation tag '495f3734' to 'f5dec15e'
updates image gitea/astrololo-render tag 'latest' to 'f5dec15e'
2026-07-28 19:50:13 +00:00
argocd-image-updater a60dd816e8 build: automatic update of astrololo
updates image gitea/astrololo-render tag 'latest' to 'f5dec15e'
2026-07-28 19:48:08 +00:00
argocd-image-updater 3aba21d062 build: automatic update of astrololo
updates image gitea/astrololo-presentation tag '998c83b2' to '495f3734'
2026-07-28 18:29:32 +00:00
argocd-image-updater 615293b916 build: automatic update of astrololo
updates image gitea/astrololo-data tag '623603b1' to '998c83b2'
updates image gitea/astrololo-logic tag '623603b1' to '998c83b2'
updates image gitea/astrololo-presentation tag '4b17f2dd' to '998c83b2'
2026-07-28 16:27:02 +00:00