Compare commits

..

101 Commits

Author SHA1 Message Date
gitea 34947f8871 docs(nfs): po zmianie eksportu rollout restart nie wystarcza
Najdroższy czasowo moment pierwszego wdrożenia, więc zapisany wprost.

FAKT: eksport poprawiony (mapall_user), usługa NFS zrestartowana, pod
zrestartowany przez `rollout restart` — a zapis z poda nadal odbijał się
o Permission denied. Jednocześnie ręczne zamontowanie TEGO SAMEGO eksportu
z TEGO SAMEGO węzła pozwalało pisać.

HIPOTEZA (niepotwierdzona u źródła): jądro współdzieli strukturę montowania NFS
między montowania tego samego eksportu na węźle, razem z cache odpowiedzi ACCESS.
`rollout restart` zostawia stary i nowy pod na chwilę współistniejące — widać to
w jego własnym logu jako „1 old replicas are pending termination" — więc
montowanie ani na moment nie zostaje bez użytkownika i nowy pod dziedziczy
odpowiedź sprzed zmiany.

ROZWIĄZANIE (zweryfikowane): zejść do zera replik, poczekać na zniknięcie podów,
wrócić do jednej. W ArgoCD ten sam skutek daje force delete poda.

Dopisany też test rozdzielający winę serwera od winy klienta: ręczny montaż
z węzła z pominięciem Kubernetesa. SERWER-OK przy jednoczesnej odmowie w podzie
znaczy, że na NAS-ie nie ma czego poprawiać — i oszczędza rundy zmian
w konfiguracji udziału, które niczego nie dają.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-09 11:53:14 +02:00
gitea 4ae06364d6 docs(nfs): prawa do udziału opisane zgodnie z tym, co jest naprawdę
Runbook kazał robić `chown apps:apps` na użytkownika, którego na tym NAS-ie nie
ma, i nie tłumaczył, DLACZEGO zapis się nie udaje. A przyczyna jest myląca:
kontener działa jako root, NFS domyślnie stosuje root_squash, więc root z klienta
ląduje jako `nobody` — czyli w kategorii „inni", dla której świeży dataset
(drwxrwx--- root root) nie daje żadnych praw. `ls` w podzie pokazuje przy tym
„root root", co sugeruje, że wszystko jest w porządku.

Teraz są dwa jawne warianty: prostszy (mapall_user: root, katalog bez zmian —
squash wyłączony dla TEGO JEDNEGO udziału, w którym leży jeden plik) i czystszy
(dedykowany użytkownik + chown). Dopisane, czego nie robić: chmod 777 zadziała,
ale uczyni katalog zapisywalnym dla każdego lokalnego użytkownika NAS-a, a leżą
tam hashe haseł.

Dołożona sekcja rozstrzygająca „jeśli mimo wszystko Permission denied": trzy
komendy pokazujące jednocześnie stronę kontenera, stronę eksportu i stronę
katalogu, plus opis zestawu, który działa.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-09 11:43:54 +02:00
gitea ddec1ee5a7 docs(nfs): runbook radzi sobie z udziałem, który już istnieje
Instrukcja kazała wołać sharing.nfs.create, co przy istniejącym udziale odbija się
komunikatem „Export conflict" — i zostawia człowieka bez następnego kroku.
Teraz najpierw query, potem create ALBO update, zależnie od wyniku.

Dołożony sprawdzian `exportfs -v`: zapisana konfiguracja udziału i stan eksportu
to dwie różne rzeczy, a „access denied by server" przy poprawnej liście hostów
najczęściej znaczy właśnie, że usługa nie przeładowała eksportów.

Tabela objawów rozróżnia cztery przypadki, które łatwo pomylić: brak praw, brak
wpuszczenia przez serwer, brak katalogu i negocjację wersji NFS.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-07 18:48:44 +02: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
argocd-image-updater 5d1be5398b build: automatic update of conjurer
updates image gitea/conjurer-librarian tag 'latest' to 'defc482a'
updates image gitea/conjurer-bot tag 'e1fca864' to 'defc482a'
2026-08-01 11:54:44 +00:00
gitea 70161cb7bd fx 2026-08-01 13:52:47 +02:00
argocd-image-updater 486e81a817 build: automatic update of conjurer
updates image gitea/conjurer-librarian tag 'latest' to 'defc482a'
2026-08-01 11:52:39 +00:00
argocd-image-updater 3d521a20c8 build: automatic update of conjurer
updates image gitea/conjurer-bot tag '3f4a1d50' to 'e1fca864'
2026-07-31 20:32:28 +00:00
argocd-image-updater 92c1683363 build: automatic update of conjurer
updates image gitea/conjurer-bot tag 'latest' to '3f4a1d50'
2026-07-31 18:15:55 +00:00
argocd-image-updater 627a8b5d7f build: automatic update of conjurer
updates image gitea/conjurer-bot tag 'latest' to 'e9e731e2'
2026-07-31 18:11:52 +00:00
argocd-image-updater 6c0213911d build: automatic update of conjurer
updates image gitea/conjurer-librarian tag '031c1f8a' to 'latest'
2026-07-30 17:43:53 +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 cab8bda7f8 build: automatic update of conjurer
updates image gitea/conjurer-bot tag '031c1f8a' to 'latest'
2026-07-30 17:11:02 +00:00
gitea aa4f015212 fx 2026-07-30 17:39:22 +02:00
argocd-image-updater 8ec74d1af0 build: automatic update of conjurer
updates image gitea/conjurer-bot tag 'f177dee4' to '031c1f8a'
2026-07-30 15:34:35 +00:00
argocd-image-updater bdb8a0cb0d build: automatic update of conjurer
updates image gitea/conjurer-librarian tag 'f177dee4' to '031c1f8a'
2026-07-30 15:26:22 +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
argocd-image-updater a2bd1e0202 build: automatic update of astrololo
updates image gitea/astrololo-data tag '623603b1' to '998c83b2'
updates image gitea/astrololo-logic tag '623603b1' to '998c83b2'
2026-07-28 16:24:58 +00:00
argocd-image-updater 073ed904e9 build: automatic update of astrololo
updates image gitea/astrololo-data tag '623603b1' to '998c83b2'
updates image gitea/astrololo-render tag '56131b20' to 'latest'
2026-07-28 16:22:44 +00:00
argocd-image-updater 494b49b9ac build: automatic update of astrololo
updates image gitea/astrololo-render tag '56131b20' to 'latest'
2026-07-28 16:18:33 +00:00
argocd-image-updater 14e62adc94 build: automatic update of conjurer
updates image gitea/conjurer-librarian tag 'e243777e' to 'f177dee4'
updates image gitea/conjurer-bot tag 'e243777e' to 'f177dee4'
2026-07-28 13:51:02 +00:00
argocd-image-updater 3dccbeb27d build: automatic update of conjurer
updates image gitea/conjurer-librarian tag 'e243777e' to 'f177dee4'
2026-07-28 13:48:55 +00:00
gitea 00ce859105 2 2026-07-28 15:37:48 +02:00
gitea d4dda58492 1 2026-07-28 15:34:12 +02:00
gitea 182c579664 Fix updater 2026-07-28 14:21:00 +02:00
argocd-image-updater 2f4e8d1799 build: automatic update of conjurer
updates image gitea/conjurer-bot tag 'c8aae106' to 'e243777e'
2026-07-28 12:17:50 +00:00
gitea 65d1d0c4d8 imageupdater 2026-07-28 14:10:07 +02:00
gitea 8020eb6b05 bot 2026-07-28 13:56:46 +02:00
gitea 327028ce42 bot 2026-07-28 13:40:49 +02:00
gitea 4fa3700f9c Libr 2026-07-28 13:28:38 +02:00
gitea 31a97615a3 Libr 2026-07-28 13:25:04 +02:00
gitea 19ed73cd11 Libr 2026-07-28 11:22:00 +00:00
argocd-image-updater 303be20455 build: automatic update of astrololo
updates image gitea/astrololo-render tag 'latest' to '56131b20'
2026-07-26 19:32:42 +00:00
argocd-image-updater a092350b3b build: automatic update of astrololo
updates image gitea/astrololo-presentation tag '623603b1' to '4b17f2dd'
2026-07-25 23:58:48 +00:00
gitea 3df1170f5d chore(astrololo): manifest CRD image-updater w repo (ślad tego, co śledzimy)
Konfiguracja argocd-image-updater istniała tylko w klastrze (ręczne `kubectl
apply`, brak w git). Skutkiem był PRE-24: `render` zbudował się i zdeployował raz,
ale kolejne buildy nie schodziły — bo nie było go na JAWNEJ liście obserwowanych
obrazów CRD, a nigdzie nie dało się tego podejrzeć ani odtworzyć.

Zrzucam manifest (z `render` już w środku, 4 obrazy: data/logic/presentation/
render) do `astrololo/image-updater.yaml` + opis w README.

Plik CELOWO nie jest w kustomization.yaml: resource stoi w ns `argocd` (poza
namespace docelowym aplikacji), a to konfiguracja kontrolera wdrażającego tę
aplikację — nakładany ręcznie (`kubectl apply -f astrololo/image-updater.yaml`),
w repo dla odtwarzalności i historii. Dodanie nowej usługi = dopisanie wpisu tutaj.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-26 00:02:53 +02:00
argocd-image-updater 39185c128b build: automatic update of astrololo
updates image gitea/astrololo-data tag '171deff2' to '623603b1'
updates image gitea/astrololo-logic tag '171deff2' to '623603b1'
updates image gitea/astrololo-presentation tag '171deff2' to '623603b1'
2026-07-25 19:08:50 +00:00
argocd-image-updater 3fe5c33366 build: automatic update of astrololo
updates image gitea/astrololo-data tag '15964dd0' to '171deff2'
updates image gitea/astrololo-logic tag '15964dd0' to '171deff2'
updates image gitea/astrololo-presentation tag '15964dd0' to '171deff2'
2026-07-25 16:33:55 +00:00
argocd-image-updater a38c6d2fc6 build: automatic update of astrololo
updates image gitea/astrololo-data tag 'f24616d3' to '15964dd0'
updates image gitea/astrololo-logic tag 'f24616d3' to '15964dd0'
updates image gitea/astrololo-presentation tag 'f24616d3' to '15964dd0'
2026-07-25 15:07:14 +00:00
gitea 57d0cca6f9 feat(astrololo): usluga render — raport PDF (PRE-24)
Nowy komponent skladajacy raport PDF. Osobny obraz, bo dzwiga TeX Live (setki MB)
— ta sama zasada co przy izolacji swissepha (LOG-27): obraz produktu zostaje maly,
TeX aktualizuje sie niezaleznie, a awaria renderu nie kladzie aplikacji, tylko
przycisk „Pobierz PDF".

- render.yaml — Deployment + Service. ClusterIP, BEZ NodePortu i Ingressu: nie ma
  powodu, zeby ktokolwiek siegal do tej uslugi z zewnatrz. Rozmawia wylacznie
  z prezentacja.
- Szyfrowanie: wlasny, TRZECI klucz LINK_KEY_PRESENTATION_RENDER z sekretu
  astrololo-link. Osobny, bo tym laczem plynie CALY raport (dane urodzeniowe
  i opisy z baz) — przejecie go nie moze otwierac lacza do logiki ani danych.
  LINK_ENCRYPTION_REQUIRED=true, wiec bez klucza pod NIE wstaje.
- readOnlyRootFilesystem + emptyDir na /tmp: kompilacja pisze tylko do katalogu
  tymczasowego, raport nie zostawia sladu w kontenerze.
- Limity rozjechane celowo (100m/256Mi -> 1500m/1Gi): XeLaTeX na obszernym
  raporcie bierze duzo, ale na krotko.
- presentation: RENDER_URL + trzeci klucz lacza.

Sekret astrololo-link trzeba UZUPELNIC o trzeci klucz PRZED wdrozeniem,
zachowujac dwa dotychczasowe — komenda w instrukcji.

Sprawdzone: kubectl kustomize + apply --dry-run=server na zywym klastrze
(service/render i deployment.apps/render created).

Pelna instrukcja: docs/wdrozenie-render-pdf.md w repo astrololo.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-25 15:09:27 +02:00
argocd-image-updater d137a49e28 build: automatic update of astrololo
updates image gitea/astrololo-data tag 'f34016a4' to 'f24616d3'
updates image gitea/astrololo-logic tag 'f34016a4' to 'f24616d3'
updates image gitea/astrololo-presentation tag '6c9029c4' to 'f24616d3'
2026-07-25 11:27:32 +00:00
argocd-image-updater e26d888c01 build: automatic update of astrololo
updates image gitea/astrololo-presentation tag '8cc329ab' to '6c9029c4'
2026-07-24 19:22:23 +00:00
argocd-image-updater db0c9b16e6 build: automatic update of astrololo
updates image gitea/astrololo-presentation tag '76fbdefe' to '8cc329ab'
2026-07-24 19:08:14 +00:00
argocd-image-updater 71dd1b24c3 build: automatic update of astrololo
updates image gitea/astrololo-presentation tag 'f34016a4' to '76fbdefe'
2026-07-24 18:21:46 +00:00
16 changed files with 820 additions and 4 deletions
+279
View File
@@ -0,0 +1,279 @@
# Udział na stan prezentacji — `astrololo-state`
Potrzebny do kont zakładanych z ekranu „Konta" (PRE-27). **Bez niego pod
`presentation` nie wstanie.**
---
## Dlaczego osobny udział, a nie podkatalog
Pierwsza wersja montowała `/mnt/Tank1/astrololo` z `subPath: presentation-state`
i pod stanął w `CreateContainerConfigError`:
```
failed to create subPath directory for volumeMount "state" of container "presentation"
```
Przyczyna była podwójna i za każdym razem ta sama: udział z bazami jest
wyeksportowany **`ro: true` z `root_squash`** (patrz runbook DAN-25 w repo
aplikacji). Zatem:
1. kubelet nie mógł utworzyć podkatalogu — bo udział jest tylko do odczytu,
2. a gdyby nawet mógł, aplikacja i tak nie zapisałaby tam pliku kont.
**Osobny udział rozwiązuje to bez ruszania DAN-25.** Udział z bazami zostaje tylko
do odczytu; konta dostają własne, małe miejsce. Przy okazji znika `subPath`, czyli
znika potrzeba, żeby kubelet cokolwiek zakładał — katalog istnieje, bo jest
korzeniem udziału.
---
## Krok 1 — dataset i udział na TrueNAS
Po SSH na NAS (192.168.1.34). Konwencja jak w DAN-25: **nie edytujemy
`/etc/exports` ręcznie**, tylko przez `midclt`.
```bash
# dataset
sudo zfs create Tank1/astrololo-state
```
Jeśli `Tank1` nie jest pulą ZFS albo wolisz zwykły katalog:
```bash
sudo mkdir -p /mnt/Tank1/astrololo-state
```
### Właściciel i prawa — TU JEST NAJCZĘSTSZY BŁĄD
Kontenery aplikacji działają **jako root** (`uid=0`), a NFS domyślnie stosuje
**`root_squash`**: root z klienta NIE jest rootem na udziale — ląduje jako
`nobody`. Świeży dataset ma prawa `drwxrwx--- root root`, czyli **nic dla
„innych"** — i dlatego zapis odbija się o `Permission denied`, mimo że `ls`
w podzie pokazuje `root root`.
To myli, bo `ls` pokazuje właściciela KATALOGU, a nie to, kim jest dla serwera
proces, który próbuje pisać.
Do wyboru dwa rozwiązania. Oba trzeba ustawić **przy eksporcie** (niżej), tu
tylko przygotowujemy katalog.
**A. Prościej — bez zakładania użytkownika.** Katalog zostaje `root:root 770`,
a przy eksporcie ustawiamy `mapall_user: "root"`. To wyłącza squash **dla tego
jednego udziału**. Zasięg jest wąski: eksportowany jest wyłącznie ten katalog,
montują go tylko trzy węzły k8s, leży w nim jeden plik. Nic nie trzeba robić —
świeży dataset ma już właściwe prawa.
**B. Czyściej — dedykowany użytkownik.** Zakładasz w UI TrueNAS
nieuprzywilejowanego użytkownika (np. `astrololo`), a potem:
```bash
sudo chown -R astrololo:astrololo /mnt/Tank1/astrololo-state
sudo chmod 770 /mnt/Tank1/astrololo-state
```
i przy eksporcie podstawiasz go w `mapall_user`. Efekt ten sam, bez oddawania
roota — kosztem jednego użytkownika więcej do pamiętania.
> Istniejących użytkowników sprawdzisz przez:
> `midclt call user.query | python3 -c "import sys,json;[print(u['uid'], u['username']) for u in json.load(sys.stdin)]"`
> **Czego NIE robić:** `chmod 777`. Zadziała, ale uczyni katalog zapisywalnym dla
> każdego lokalnego użytkownika NAS-a — a leżą tam hashe haseł, więc jest to plik
> wrażliwszy niż same bazy Excela.
### Eksport NFS
> **Najpierw sprawdź, czy udziału już nie ma.** `sharing.nfs.create` odmawia
> z komunikatem `Export conflict`, jeśli ten sam katalog jest już eksportowany —
> wtedy trzeba go **zaktualizować**, nie tworzyć.
```bash
midclt call sharing.nfs.query '[["path","=","/mnt/Tank1/astrololo-state"]]' \
| python3 -m json.tool
```
**Pusta lista `[]`** — udziału nie ma, twórz:
```bash
midclt call sharing.nfs.create '{
"path": "/mnt/Tank1/astrololo-state",
"comment": "astrololo — stan prezentacji (konta PRE-27)",
"hosts": ["192.168.1.73", "192.168.1.80", "192.168.1.81"],
"enabled": true,
"ro": false,
"mapall_user": "root",
"mapall_group": "root"
}'
```
**Coś zwróciło** — weź `id` z wyniku i zaktualizuj (podstaw `<ID>`):
```bash
midclt call sharing.nfs.update <ID> '{
"hosts": ["192.168.1.73", "192.168.1.80", "192.168.1.81"],
"enabled": true,
"ro": false,
"mapall_user": "root",
"mapall_group": "root"
}'
```
> Wybrałeś wariant B? Podstaw swojego użytkownika zamiast `root` w obu polach.
| ustawienie | po co |
|---|---|
| `hosts` zawężone | te same trzy węzły k8s co w DAN-25 — nikt inny nie zamontuje |
| `ro: false` | **musi być zapisywalny**, inaczej konta się nie zapiszą |
| `mapall_user` | cały ruch z tych hostów pisze jako JEDEN użytkownik, niezależnie od UID w kontenerze — bez tego `root_squash` zamienia roota z poda na `nobody`, który nie ma praw do katalogu |
> Podstaw swoje adresy węzłów, jeśli się zmieniły. Aktualne:
> `kubectl get nodes -o wide`
---
### Sprawdź, co serwer FAKTYCZNIE eksportuje
Konfiguracja udziału i stan eksportu to **dwie różne rzeczy**: zapisana
konfiguracja nie znaczy, że usługa ją przeładowała. To jest prawda:
```bash
sudo exportfs -v | grep -A1 astrololo
```
Muszą być **dwa** wpisy: `/mnt/Tank1/astrololo` (z `ro`) oraz
`/mnt/Tank1/astrololo-state` (z `rw`), oba z listą trzech węzłów.
Jeśli `astrololo-state` **nie ma na liście**, mimo że `sharing.nfs.query` go
pokazuje — usługa nie przeładowała eksportów:
```bash
midclt call service.restart nfs
sudo exportfs -v | grep astrololo-state
```
---
## Krok 2 — sprawdź z węzła, ZANIM wdrożysz
To jest ten test, którego zabrakło za pierwszym razem:
```bash
ssh 192.168.1.73 'sudo mount -t nfs 192.168.1.34:/mnt/Tank1/astrololo-state /mnt/test \
&& sudo touch /mnt/test/proba && echo "ZAPIS DZIAŁA" \
&& sudo rm /mnt/test/proba; sudo umount /mnt/test'
```
Musi wypisać **`ZAPIS DZIAŁA`**.
| co widzisz | co to znaczy |
|---|---|
| `Permission denied` przy `touch` | montowanie działa, brakuje praw — wróć do właściciela katalogu i `mapall_user` |
| `access denied by server while mounting` | serwer nie wpuszcza w ogóle: sprawdź `exportfs -v` (czy eksport istnieje i przeładowany), `enabled: true` w udziale oraz czy adres węzła jest na liście `hosts` |
| `No such file or directory` | katalog `/mnt/Tank1/astrololo-state` nie istnieje na NAS-ie |
| montuje się tylko z `-o vers=3` | negocjacja wersji: dopisz `mountOptions` w manifeście albo włącz NFSv4 w `midclt call nfs.config` |
Adresy węzłów sprawdzisz przez `kubectl get nodes -o wide` — jeśli któryś się
zmienił od czasu DAN-25, lista `hosts` jest nieaktualna i to wystarczy, żeby
serwer odmówił.
---
## Krok 3 — wdróż i sprawdź
```bash
kubectl apply -k astrololo
kubectl -n astrololo rollout status deploy/presentation
```
Sprawdź, że aplikacja faktycznie umie tam zapisać — załóż konto testowe
na ekranie „Konta", a potem:
```bash
kubectl -n astrololo exec deploy/presentation -- ls -l /app/state/
```
Oczekiwane: plik `accounts.json`.
---
## Jeśli mimo wszystko `Permission denied`
Trzy komendy, w tej kolejności:
```bash
kubectl -n astrololo exec deploy/presentation -- sh -c 'id; ls -ld /app/state; touch /app/state/proba && echo ZAPIS-OK || echo ZAPIS-NIE'
```
```bash
midclt call sharing.nfs.query '[["path","=","/mnt/Tank1/astrololo-state"]]' \
| python3 -c "import sys,json;[print('ro:', s['ro'], '| mapall:', s.get('mapall_user'), '| hosts:', s['hosts']) for s in json.load(sys.stdin)]"
```
```bash
sudo ls -ld /mnt/Tank1/astrololo-state
```
Zestaw, który DZIAŁA: kontener jako `uid=0(root)`, udział z `ro: false`
i `mapall: root`, katalog `drwxrwx--- root root`.
### ⚠️ Po zmianie eksportu `rollout restart` NIE WYSTARCZA
To kosztowało najwięcej czasu przy pierwszym wdrożeniu, więc zapisane wprost.
**Objaw:** eksport poprawiony, `service.restart nfs` wykonany, pod zrestartowany —
a zapis z poda nadal odbija się o `Permission denied`. Przy czym **ręczne
zamontowanie tego samego eksportu z tego samego węzła działa** i pozwala pisać.
**Co z tym zrobić:** doprowadzić do stanu, w którym ŻADEN pod nie trzyma tego
montowania.
```bash
kubectl -n astrololo scale deploy/presentation --replicas=0
kubectl -n astrololo wait --for=delete pod -l app=presentation --timeout=90s
kubectl -n astrololo scale deploy/presentation --replicas=1
kubectl -n astrololo rollout status deploy/presentation
```
`rollout restart` tego nie osiąga, bo stary i nowy pod na chwilę WSPÓŁISTNIEJĄ —
w logu widać `1 old replicas are pending termination`. Montowanie ani na moment
nie zostaje bez użytkownika. (W ArgoCD ten sam skutek daje `force delete` poda.)
**Dlaczego (hipoteza, nie potwierdzona u źródła):** jądro współdzieli strukturę
montowania NFS między montowania tego samego eksportu na węźle, razem z cache
odpowiedzi ACCESS. Nowy pod podpina się do żywego montowania i dziedziczy
odpowiedź sprzed zmiany eksportu.
**Test, który rozstrzyga, czy winny jest serwer czy klient** — montaż ręczny
z węzła, z pominięciem Kubernetesa:
```bash
ssh <węzeł> 'sudo mkdir -p /mnt/t && sudo mount -t nfs 192.168.1.34:/mnt/Tank1/astrololo-state /mnt/t \
&& sudo touch /mnt/t/proba && echo SERWER-OK || echo SERWER-NIE; sudo umount /mnt/t'
```
`SERWER-OK` przy jednoczesnym `Permission denied` w podzie znaczy, że konfiguracja
NAS-a jest dobra i **nie ma czego na nim poprawiać** — problem jest po stronie
klienta.
Osobno pamiętaj: sama zmiana konfiguracji udziału nie przeładowuje eksportów.
Po każdej zmianie `midclt call service.restart nfs`.
---
## Odkręcenie
```bash
# ID udziału
midclt call sharing.nfs.query | python3 -c "import sys,json;[print(s['id'], s.get('path')) for s in json.load(sys.stdin)]"
midclt call sharing.nfs.delete <ID>
```
---
## Uwaga na przyszłość: DAN-27 uderzy w tę samą ścianę
Zarządzanie plikami baz (wgrywanie, archiwizacja, kasowanie) wymaga zapisu do
**udziału z bazami** — a ten jest `ro: true`. Ten runbook tego **nie rozwiązuje**
i celowo nie rusza DAN-25: to osobna decyzja, bo oznacza rezygnację z gwarancji,
że baz nie da się zmienić przez NFS. Patrz PR `feat/pliki-zapis`.
+25
View File
@@ -8,6 +8,31 @@ Warstwy: `presentation` (wejście z przeglądarki przez **Ingress po https**)
Adres aplikacji: **https://astrololo.czernobog.pl** — patrz [TLS](#-tls--wymagane-kroki-przed-wdrożeniem). Adres aplikacji: **https://astrololo.czernobog.pl** — patrz [TLS](#-tls--wymagane-kroki-przed-wdrożeniem).
## Co śledzi image-updater — [`image-updater.yaml`](image-updater.yaml)
Lista obrazów podbijanych automatycznie jest **jawna** i żyje w CRD `ImageUpdater`
(ns `argocd`). Obraz, którego na niej nie ma, **nigdy się nie podbije**, choćby CI
go budowało — tak przez chwilę wisiał `render` na `:latest`, zanim dopisaliśmy go do
listy. Dodając nową usługę, dopisz jej wpis w `image-updater.yaml` i nałóż:
```bash
kubectl apply -f astrololo/image-updater.yaml
```
Ten plik **celowo nie jest w `kustomization.yaml`**: resource stoi w ns `argocd`
(poza namespace docelowym aplikacji), a to konfiguracja kontrolera, który wdraża tę
aplikację — nakładamy go ręcznie, w repo trzymamy dla odtwarzalności i historii.
## ⚠️ Udział `astrololo-state` — wymagany przez konta (PRE-27)
Pod `presentation` **nie wstanie bez niego** (`CreateContainerConfigError:
failed to create subPath directory`). Osobny runbook:
**[README-stan-prezentacji.md](README-stan-prezentacji.md)**.
Krótko: udział z bazami jest wyeksportowany `ro` (DAN-25), więc konta nie mogą tam
mieszkać — dostają własny, mały udział `/mnt/Tank1/astrololo-state`, zapisywalny,
zawężony do tych samych węzłów.
## ⚠️ Sekret `astrololo-auth` — utwórz PRZED wdrożeniem ## ⚠️ Sekret `astrololo-auth` — utwórz PRZED wdrożeniem
Aplikacja wystawia treść **oryginalnych baz interpretacyjnych**, dlatego wymaga Aplikacja wystawia treść **oryginalnych baz interpretacyjnych**, dlatego wymaga
+4
View File
@@ -9,6 +9,10 @@ spec:
template: template:
metadata: { labels: { app: data } } metadata: { labels: { app: data } }
spec: spec:
# LOG-33: pody nie rozmawiają z API Kubernetesa, więc token konta
# serwisowego jest im niepotrzebny — a zamontowany byłby gotowym
# punktem wyjścia do klastra dla kogoś, kto przejmie kontener.
automountServiceAccountToken: false
imagePullSecrets: [{ name: gitea-registry }] imagePullSecrets: [{ name: gitea-registry }]
containers: containers:
- name: data - name: data
+44
View File
@@ -0,0 +1,44 @@
# Konfiguracja argocd-image-updater dla astrololo — ŹRÓDŁO PRAWDY tego, CO śledzimy.
#
# Model v1.x: osobny CRD `ImageUpdater` w ns `argocd` (nie adnotacje na Application).
# Lista `images` jest JAWNA — obraz, którego tu NIE MA, nigdy nie zostanie podbity,
# choćby CI go budowało. Tak przez chwilę wisiał `render` na `:latest` (PRE-24):
# usługa istniała i budowała tag SHA, ale updater jej nie znał, więc kustomization
# jej nie ruszał. Dopisanie wpisu = wejście usługi do rotacji.
#
# ⚠️ TEGO PLIKU NIE MA w astrololo/kustomization.yaml i NIE MA GO TAM MIEĆ:
# 1. resource żyje w ns `argocd`, a Application astrololo celuje w ns `astrololo`
# — auto-sync przez kustomize próbowałby zapisać poza swój namespace docelowy;
# 2. to konfiguracja kontrolera, który wdraża tę właśnie aplikację — niech app
# nie zarządza narzędziem, które ją wdraża.
# Plik jest trzymany w repo dla odtwarzalności i historii; nakłada się go RĘCZNIE:
# kubectl apply -f astrololo/image-updater.yaml
#
# Strategia `newest-build`: updater bierze obraz o NAJNOWSZYM znaczniku czasu builda
# i zapisuje jego tag SHA do kustomization (write-back git). Uwaga na reprodukowalne
# buildy — identyczny `created` na kilku tagach potrafi zablokować wybór najnowszego.
apiVersion: argocd-image-updater.argoproj.io/v1alpha1
kind: ImageUpdater
metadata:
name: astrololo
namespace: argocd
spec:
applicationRefs:
- namePattern: astrololo
images:
- alias: data
imageName: gitea.czernobog.pl/gitea/astrololo-data
- alias: logic
imageName: gitea.czernobog.pl/gitea/astrololo-logic
- alias: presentation
imageName: gitea.czernobog.pl/gitea/astrololo-presentation
- alias: render
imageName: gitea.czernobog.pl/gitea/astrololo-render
commonUpdateSettings:
updateStrategy: newest-build
writeBackConfig:
method: git:secret:argocd/git-creds
gitConfig:
repository: https://gitea.czernobog.pl/gitea/deploy.git
branch: master
writeBackTarget: kustomization:/astrololo
+4 -4
View File
@@ -10,10 +10,10 @@ resources:
- ingress.yaml # wejście po https + przekierowanie z http - ingress.yaml # wejście po https + przekierowanie z http
images: images:
- name: gitea.czernobog.pl/gitea/astrololo-data - name: gitea.czernobog.pl/gitea/astrololo-data
newTag: f34016a4 newTag: baf4e0e3
- name: gitea.czernobog.pl/gitea/astrololo-logic - name: gitea.czernobog.pl/gitea/astrololo-logic
newTag: f34016a4 newTag: baf4e0e3
- name: gitea.czernobog.pl/gitea/astrololo-render - name: gitea.czernobog.pl/gitea/astrololo-render
newTag: latest newTag: aec3f843
- name: gitea.czernobog.pl/gitea/astrololo-presentation - name: gitea.czernobog.pl/gitea/astrololo-presentation
newTag: f34016a4 newTag: a8339659
+4
View File
@@ -9,6 +9,10 @@ spec:
template: template:
metadata: { labels: { app: logic } } metadata: { labels: { app: logic } }
spec: spec:
# LOG-33: pody nie rozmawiają z API Kubernetesa, więc token konta
# serwisowego jest im niepotrzebny — a zamontowany byłby gotowym
# punktem wyjścia do klastra dla kogoś, kto przejmie kontener.
automountServiceAccountToken: false
imagePullSecrets: [{ name: gitea-registry }] imagePullSecrets: [{ name: gitea-registry }]
containers: containers:
- name: logic - name: logic
+31
View File
@@ -9,6 +9,10 @@ spec:
template: template:
metadata: { labels: { app: presentation } } metadata: { labels: { app: presentation } }
spec: spec:
# LOG-33: pody nie rozmawiają z API Kubernetesa, więc token konta
# serwisowego jest im niepotrzebny — a zamontowany byłby gotowym
# punktem wyjścia do klastra dla kogoś, kto przejmie kontener.
automountServiceAccountToken: false
imagePullSecrets: [{ name: gitea-registry }] imagePullSecrets: [{ name: gitea-registry }]
containers: containers:
- name: presentation - name: presentation
@@ -56,9 +60,36 @@ spec:
secretKeyRef: { name: astrololo-link, key: LINK_KEY_PRESENTATION_RENDER } secretKeyRef: { name: astrololo-link, key: LINK_KEY_PRESENTATION_RENDER }
- name: LINK_ENCRYPTION_REQUIRED - name: LINK_ENCRYPTION_REQUIRED
value: "true" value: "true"
# Konta zakładane z ekranu „Konta" (PRE-26). Konto administracyjne
# zostaje w APP_USER/APP_PASSWORD powyżej — celowo, bo dzięki temu
# NIE DA SIĘ go skasować ani ograniczyć z aplikacji.
- name: ACCOUNTS_FILE
value: "/app/state/accounts.json"
volumeMounts:
# OSOBNY UDZIAŁ, nie podkatalog udziału z bazami. Pierwsza wersja
# montowała /mnt/Tank1/astrololo z subPath — i nie wstała:
# „failed to create subPath directory”. Powód był podwójny i oba razy
# ten sam brak: udział z bazami jest wyeksportowany `ro: true`
# z `root_squash` (DAN-25), więc (1) kubelet nie mógł utworzyć
# podkatalogu, a (2) gdyby nawet mógł, aplikacja i tak nie zapisałaby
# tam pliku kont.
#
# Osobny udział rozwiązuje to bez naruszania DAN-25: udział z bazami
# ZOSTAJE tylko do odczytu, a konta mają własne, małe miejsce.
# Przy okazji znika subPath, czyli znika potrzeba, żeby kubelet
# cokolwiek zakładał — katalog istnieje, bo jest korzeniem udziału.
- name: state
mountPath: /app/state
resources: resources:
requests: { cpu: "100m", memory: "128Mi" } requests: { cpu: "100m", memory: "128Mi" }
limits: { cpu: "300m", memory: "256Mi" } limits: { cpu: "300m", memory: "256Mi" }
volumes:
- name: state
nfs:
server: 192.168.1.34
# Udział WYŁĄCZNIE na stan prezentacji (konta z PRE-27). Wymaga
# utworzenia na TrueNAS — patrz README-stan-prezentacji.md.
path: /mnt/Tank1/astrololo-state
--- ---
apiVersion: v1 apiVersion: v1
kind: Service kind: Service
+4
View File
@@ -19,6 +19,10 @@ spec:
template: template:
metadata: { labels: { app: render } } metadata: { labels: { app: render } }
spec: spec:
# LOG-33: pody nie rozmawiają z API Kubernetesa, więc token konta
# serwisowego jest im niepotrzebny — a zamontowany byłby gotowym
# punktem wyjścia do klastra dla kogoś, kto przejmie kontener.
automountServiceAccountToken: false
imagePullSecrets: [{ name: gitea-registry }] imagePullSecrets: [{ name: gitea-registry }]
containers: containers:
- name: render - name: render
+106
View File
@@ -0,0 +1,106 @@
# Production ("deploy") Conjurer bot
A second Conjurer bot that runs **alongside** the test `bot` in the `conjurer`
namespace, sharing the same librarian / musician / radio and the shared
`CONJURER_API_KEY`. It differs from the test bot only in:
- its Discord token: the **`deploy-conjurer-netrc`** secret (already created),
- distinct names/labels (`deploy-bot`) and NodePort **32443**,
- **`/data` on NFS (RWX)** instead of a block PVC — so you can seed/upload files
while it runs and back it up concurrently.
Files: `deploy-bot.yaml` (Deployment + Service), `deploy-bot-backup.yaml`
(daily backup CronJob). Both are wired into `kustomization.yaml`.
## Update channel — only on `[deploy]`
Unlike the test bot (which tracks every build), the production bot updates **only
when you promote a version**. It runs a **separate image**,
`conjurer-bot-deploy`, which the conjurer CI tags **only when the commit message
contains `[deploy]`** (it re-tags the already-built `conjurer-bot:<sha>` — same
bytes). The image-updater's `deploy-bot` alias then bumps this bot's tag.
So: normal commits update the test bot + librarian; a commit with `[deploy]` in
its message is the one that also rolls the production bot.
**Already bootstrapped:** the channel was seeded by the first `[deploy]` commit
(the merge of conjurer#20), which promoted `conjurer-bot-deploy:fbd1ec9f` — the
tag pinned in `kustomization.yaml`. From here the image-updater keeps it current
on each future `[deploy]` commit. Note the librarian is shared and still tracks
latest, so mind large bot⇄librarian version skews.
If you ever need to seed a tag by hand:
```bash
docker pull gitea.czernobog.pl/gitea/conjurer-bot:<sha>
docker tag gitea.czernobog.pl/gitea/conjurer-bot:<sha> \
gitea.czernobog.pl/gitea/conjurer-bot-deploy:<sha>
docker push gitea.czernobog.pl/gitea/conjurer-bot-deploy:<sha>
```
## One-time setup
1. **Secret** — already exists as `deploy-conjurer-netrc` (a netrc carrying the
deploy Discord token, key `.netrc`). Nothing to do; the Deployment mounts it
at `/secrets/.netrc`.
2. **NFS export** — create the data + backup dirs on the NFS server
(`192.168.1.34`, adjust to your real export):
```
/mnt/Tank1/conjurer_swap/deploy-bot/data
/mnt/Tank1/conjurer_swap/deploy-bot/backups
```
## Seeding / uploading config & state into /data
Because `/data` is a plain NFS export, you upload files by copying them onto the
share — **no `kubectl cp`, no scaling the bot down**. From the PVE box that holds
`/srv/data` (mount the same export there, or rsync over it):
```bash
# on a host that can see the NFS export:
rsync -a /srv/data/ 192.168.1.34:/mnt/Tank1/conjurer_swap/deploy-bot/data/
```
The bot roots everything under `CONJURER_DATA_DIR=/data`, so these land where it
expects them:
```
accident_log.json Conjurer_graphics/ music/ pamiec.json
pamiec_muzyki.json settings.json system_gpt_settings.json transcripts/
```
Upload as much or as little as you like — the bot seeds any missing JSON on
first run. Live-editing `pamiec.json` while the bot writes to it can race; prefer
seeding before first start or during a brief `kubectl -n conjurer scale
deploy/deploy-bot --replicas=0` window.
## Backups (production only)
`deploy-bot-backup` runs daily (04:17) and writes to the `backups` export:
- `current/` — a full rsync mirror of `/data` (incl. music/graphics), always
the latest state,
- `snapshots/deploy-state-<date>.tgz` — dated archives of the critical small
state (both memories, settings, accident log, transcripts), kept
`RETENTION_DAYS` (30) days.
The test bot is deliberately **not** backed up (amnesia there is fine).
Restore example:
```bash
tar xzf snapshots/deploy-state-2026-08-03-0417.tgz -C /mnt/.../deploy-bot/data/
```
## Routing librarian / musician callbacks
**Librarian — handled automatically.** Each bot advertises its own
`CONJURER_SELF_CALLBACK` (test `…:32442`, this bot `…:32443`) on every query and
ping, and the librarian answers each result/pong back to the bot that asked. One
librarian serves both bots — no `CONJURER_MAIN_BOT` repointing needed. (The
librarian keeps `CONJURER_MAIN_BOT: http://bot:5000` only as a fallback for a bot
that doesn't send a callback.)
**Musician — still single-target.** The musician pushes "now playing" events to
its one `CONJURER_MAIN_BOT` (currently the test bot, `192.168.1.73:32442`). Only
one bot gets radio events; repoint the musician's `CONJURER_MAIN_BOT` to
`192.168.1.73:32443` if the production bot should show them instead.
+62
View File
@@ -0,0 +1,62 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: bot
namespace: conjurer
spec:
replicas: 1 # NIGDY więcej — jedna sesja gateway na token
strategy: { type: Recreate } # NIE RollingUpdate — dwa pody = wojna o sesję Discord
selector: { matchLabels: { app: bot } }
template:
metadata: { labels: { app: bot } }
spec:
imagePullSecrets: [{ name: gitea-registry }]
containers:
- name: bot
image: gitea.czernobog.pl/gitea/conjurer-bot:c8aae106
ports: [{ containerPort: 5000 }]
env:
- { name: CONJURER_DATA_DIR, value: "/data" }
- { name: CONJURER_DISCORD_HOST, value: "0.0.0.0" }
- { name: CONJURER_DISCORD_PORT, value: "5000" }
- { name: CONJURER_API_KEY, value: "d97008b3-7a5a-11f1-acd1-000b0e0f00ed" }
- { name: CONJURER_NETRC_FILE, value: "/secrets/.netrc" }
# ↓ NAZWY PODSTAW WG WYNIKU grepa z 0.2 ↓
- { name: CONJURER_LIBRARIAN_SERVICE, value: "http://librarian:5001" }
- { name: CONJURER_MUSICIAN_SERVICE, value: "http://192.168.1.89:5000" }
- { name: CONJURER_RADIO_SERVICE, value: "http://192.168.1.79:5005" }
- { name: CONJURER_FILE_SERVICE, value: "http://192.168.1.89:5000" }
- { name: CONJURER_RADIO_HARBOR, value: "http://192.168.1.79:54321" }
# Where the librarian sends THIS bot's results/pongs back to (its own
# NodePort). Lets one librarian serve both bots - see deploy-bot.yaml.
- { name: CONJURER_SELF_CALLBACK, value: "http://192.168.1.73:32442" }
volumeMounts:
- { name: data, mountPath: /data }
- { name: netrc, mountPath: /secrets, readOnly: true }
resources:
requests: { cpu: "200m", memory: "256Mi" }
limits: { cpu: "2", memory: "1Gi" }
volumes:
- name: data
persistentVolumeClaim: { claimName: bot-data }
- name: netrc
secret: { secretName: conjurer-netrc }
---
apiVersion: v1
kind: PersistentVolumeClaim
metadata: { name: bot-data, namespace: conjurer }
spec:
accessModes: [ReadWriteOnce]
resources: { requests: { storage: 2Gi } }
---
apiVersion: v1
kind: Service
metadata: { name: bot, namespace: conjurer }
spec:
type: NodePort # radio/musician z Dockera muszą go dosięgnąć
selector: { app: bot }
# nodePort PRZYPIĘTY na sztywno. Bez tego k8s losuje port z 30000-32767 przy
# (od)tworzeniu Service, a musician/betoniarka z Dockera adresują bota po
# http://192.168.1.73:32442 na sztywno - rozjazd = wyniki/eventy giną w locie.
ports: [{ port: 5000, targetPort: 5000, nodePort: 32442 }]
+22
View File
@@ -0,0 +1,22 @@
apiVersion: argocd-image-updater.argoproj.io/v1alpha1
kind: ImageUpdater
metadata:
name: conjurer
namespace: argocd
spec:
commonUpdateSettings:
updateStrategy: "newest-build"
writeBackConfig:
method: "git:secret:argocd/git-creds"
gitConfig:
repository: "https://gitea.czernobog.pl/gitea/deploy.git"
branch: "master" # ← gałąź repo deploy
writeBackTarget: "kustomization:/conjurer"
applicationRefs:
- namePattern: "conjurer"
images:
- { alias: "librarian", imageName: "gitea.czernobog.pl/gitea/conjurer-librarian" }
- { alias: "bot", imageName: "gitea.czernobog.pl/gitea/conjurer-bot" }
# Production bot tracks its own image, which only gets new tags on
# [deploy] commits (conjurer CI) - so it updates only on promoted builds.
- { alias: "deploy-bot", imageName: "gitea.czernobog.pl/gitea/conjurer-bot-deploy" }
+65
View File
@@ -0,0 +1,65 @@
# Daily backup of the PRODUCTION ("deploy") bot's /data.
#
# Only production is backed up - the test bot's amnesia is fine, this bot's is
# not (pamiec.json / pamiec_muzyki.json are the conversation & music memory).
# Both volumes are NFS (RWX), so this runs while the bot is live - no RWO clash.
#
# Two-part backup:
# * a full, space-efficient MIRROR (rsync --delete) of everything, incl. music
# and graphics - always the current state,
# * dated SNAPSHOTS of just the small critical state (the memories, settings,
# accident log, transcripts) so you can roll back to a point in time.
# Snapshots older than RETENTION_DAYS are pruned.
apiVersion: batch/v1
kind: CronJob
metadata:
name: deploy-bot-backup
namespace: conjurer
spec:
schedule: "17 4 * * *" # every day at 04:17
concurrencyPolicy: Forbid
successfulJobsHistoryLimit: 3
failedJobsHistoryLimit: 3
jobTemplate:
spec:
backoffLimit: 2
template:
spec:
restartPolicy: Never
containers:
- name: backup
image: alpine:3.20
command: ["/bin/sh", "-c"]
args:
- |
set -eu
apk add --no-cache rsync >/dev/null
STAMP="$(date +%F-%H%M)"
mkdir -p /backup/current /backup/snapshots
echo "[$STAMP] mirroring /data -> /backup/current"
rsync -a --delete /data/ /backup/current/
echo "[$STAMP] snapshotting critical state"
tar czf "/backup/snapshots/deploy-state-$STAMP.tgz" -C /data \
accident_log.json pamiec.json pamiec_muzyki.json \
settings.json system_gpt_settings.json transcripts \
2>/dev/null || echo " (some files absent - skipped)"
echo "[$STAMP] pruning snapshots older than ${RETENTION_DAYS}d"
find /backup/snapshots -name 'deploy-state-*.tgz' -type f \
-mtime +"${RETENTION_DAYS}" -delete
echo "[$STAMP] backup done"
env:
- { name: RETENTION_DAYS, value: "30" }
volumeMounts:
- { name: data, mountPath: /data, readOnly: true }
- { name: backup, mountPath: /backup }
volumes:
# Same export the bot mounts (read-only here).
- name: data
nfs:
server: 192.168.1.34
path: /mnt/Tank1/conjurer_swap/deploy-bot/data
# Backup target - ADJUST to your export.
- name: backup
nfs:
server: 192.168.1.34
path: /mnt/Tank1/conjurer_swap/deploy-bot/backups
+80
View File
@@ -0,0 +1,80 @@
# Production ("deploy") Conjurer bot.
#
# Same infrastructure as the test `bot` (shares librarian / musician / radio and
# the CONJURER_API_KEY), with three deliberate differences:
# 1. its Discord token comes from the `deploy-conjurer-netrc` secret,
# 2. distinct names/labels so it coexists with the test bot in this namespace,
# 3. /data is an NFS volume (RWX) instead of a block PVC - so config/state can
# be uploaded while the bot runs (just copy onto the share) and backed up
# concurrently (see deploy-bot-backup.yaml). The test bot keeps its RWO PVC.
#
# ┌─ IMPORTANT: librarian & musician call ONE bot back ─────────────────────────┐
# │ The librarian (CONJURER_MAIN_BOT) and musician push search results and │
# │ "now playing" events to a SINGLE bot address - currently the test bot's │
# │ NodePort 192.168.1.73:32442. Only one bot can receive them. To make the │
# │ PRODUCTION bot the one that gets librarian results / radio events, repoint │
# │ those services' CONJURER_MAIN_BOT to this bot's NodePort (…:32443 below). │
# └─────────────────────────────────────────────────────────────────────────────┘
apiVersion: apps/v1
kind: Deployment
metadata:
name: deploy-bot
namespace: conjurer
spec:
replicas: 1 # NIGDY więcej — jedna sesja gateway na token
strategy: { type: Recreate } # NIE RollingUpdate — dwa pody = wojna o sesję Discord
selector: { matchLabels: { app: deploy-bot } }
template:
metadata: { labels: { app: deploy-bot } }
spec:
imagePullSecrets: [{ name: gitea-registry }]
containers:
- name: bot
# SEPARATE image from the test bot: conjurer-bot-deploy only gets a new
# tag when a commit message contains [deploy] (see the conjurer CI), so
# this bot updates only on versions you explicitly promote. Tag is
# managed by the image-updater (kustomization images:).
image: gitea.czernobog.pl/gitea/conjurer-bot-deploy:c8aae106
ports: [{ containerPort: 5000 }]
env:
- { name: CONJURER_DATA_DIR, value: "/data" }
- { name: CONJURER_DISCORD_HOST, value: "0.0.0.0" }
- { name: CONJURER_DISCORD_PORT, value: "5000" }
- { name: CONJURER_API_KEY, value: "d97008b3-7a5a-11f1-acd1-000b0e0f00ed" }
- { name: CONJURER_NETRC_FILE, value: "/secrets/.netrc" }
- { name: CONJURER_LIBRARIAN_SERVICE, value: "http://librarian:5001" }
- { name: CONJURER_MUSICIAN_SERVICE, value: "http://192.168.1.89:5000" }
- { name: CONJURER_RADIO_SERVICE, value: "http://192.168.1.79:5005" }
- { name: CONJURER_FILE_SERVICE, value: "http://192.168.1.89:5000" }
- { name: CONJURER_RADIO_HARBOR, value: "http://192.168.1.79:54321" }
# This bot's own callback (its NodePort). The librarian records it per
# query and answers results/pongs HERE - so it serves this bot AND the
# test bot from one instance, no CONJURER_MAIN_BOT repointing needed.
- { name: CONJURER_SELF_CALLBACK, value: "http://192.168.1.73:32443" }
volumeMounts:
- { name: data, mountPath: /data }
- { name: netrc, mountPath: /secrets, readOnly: true }
resources:
requests: { cpu: "200m", memory: "256Mi" }
limits: { cpu: "2", memory: "1Gi" }
volumes:
# /data on NFS (RWX): lets you seed/upload files while the bot runs (copy
# straight onto the export from the PVE box that holds /srv/data) and lets
# the backup CronJob read it concurrently. ADJUST server/path to your
# actual export - mirrors the librarian's 192.168.1.34 Tank1 layout.
- name: data
nfs:
server: 192.168.1.34
path: /mnt/Tank1/conjurer_swap/deploy-bot/data
- name: netrc
secret: { secretName: deploy-conjurer-netrc }
---
apiVersion: v1
kind: Service
metadata: { name: deploy-bot, namespace: conjurer }
spec:
type: NodePort # so librarian/musician COULD reach it if repointed
selector: { app: deploy-bot }
# Distinct pinned nodePort (test bot owns 32442). Point librarian/musician
# CONJURER_MAIN_BOT at 192.168.1.73:32443 to route their callbacks here.
ports: [{ port: 5000, targetPort: 5000, nodePort: 32443 }]
+19
View File
@@ -0,0 +1,19 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- namespace.yaml
- librarian.yaml
- bot.yaml
- deploy-bot.yaml
- deploy-bot-backup.yaml
images:
- name: gitea.czernobog.pl/gitea/conjurer-librarian
newTag: ae1bd677
- name: gitea.czernobog.pl/gitea/conjurer-bot
newTag: fbd1ec9f
# Production bot channel - only bumped when a [deploy]-tagged build appears.
# Bootstrapped to fbd1ec9f: that's the image the first [deploy] build (merge
# of conjurer#20) promoted to conjurer-bot-deploy. From here the image-updater
# keeps it current across future [deploy] commits.
- name: gitea.czernobog.pl/gitea/conjurer-bot-deploy
newTag: fbd1ec9f
+67
View File
@@ -0,0 +1,67 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: librarian
namespace: conjurer
spec:
replicas: 1
selector: { matchLabels: { app: librarian } }
template:
metadata: { labels: { app: librarian } }
spec:
imagePullSecrets: [{ name: gitea-registry }]
# On SIGTERM the librarian checkpoints the running search and exits within
# CONJURER_LIBRARIAN_GRACEFUL_TIMEOUT (default 45s). Give k8s enough grace
# to let that finish before it SIGKILLs - otherwise a long scan's checkpoint
# is cut short and the search restarts from scratch instead of resuming.
terminationGracePeriodSeconds: 60
containers:
- name: librarian
image: gitea.czernobog.pl/gitea/conjurer-librarian:e243777e
ports: [{ containerPort: 5001 }]
env:
- { name: CONJURER_LIBRARIAN_HOST, value: "0.0.0.0" }
- { name: CONJURER_LIBRARIAN_PORT, value: "5001" }
- { name: CONJURER_LIBRARIAN_DB_PATH, value: "/doi/" }
- { name: CONJURER_API_KEY, value: "d97008b3-7a5a-11f1-acd1-000b0e0f00ed" }
- { name: CONJURER_LIBRARIAN_MAXTHREADS, value: "40" }
- { name: CONJURER_CROSSREF_MAILTO, value: "mtuszowski@gmail.com" }
- { name: CONJURER_LIBRARIAN_CHUNK, value: "_chunk.txt" }
# Librarian jest W TYM SAMYM klastrze/namespace co bot - gada z nim
# po DNS Service'u, nie przez nodePort węzła (ten zostaje tylko dla
# zewnętrznych musician/betoniarka z Dockera). Odporne na przetasowania.
- { name: CONJURER_MAIN_BOT, value: "http://bot:5000" }
- { name: CONJURER_LIBRARIAN_STATE_DIR, value: "/lib_temp_files" }
volumeMounts:
- { name: doi, mountPath: /doi, readOnly: true }
- { name: state, mountPath: /lib_temp_files }
resources:
requests: { cpu: "100m", memory: "512Mi" }
# Headroom bump: the work-queue OOM is fixed in code, but a deep
# search still pulls up to 15000 Crossref records into RAM and the
# accumulating result JSONs are loaded whole. 2Gi gives margin so a
# big search isn't OOM-killed. Tune down if the node is tight.
limits: { cpu: "1", memory: "2Gi" }
volumes:
- name: doi
nfs:
server: 192.168.1.34
path: /mnt/Tank1/conjurer_swap/librarian_data/base_it1
- name: state
persistentVolumeClaim: { claimName: librarian-state }
---
apiVersion: v1
kind: PersistentVolumeClaim
metadata: { name: librarian-state, namespace: conjurer }
spec:
accessModes: [ReadWriteOnce]
resources: { requests: { storage: 1Gi } }
---
apiVersion: v1
kind: Service
metadata: { name: librarian, namespace: conjurer }
spec:
selector: { app: librarian }
ports: [{ port: 5001, targetPort: 5001 }]
+4
View File
@@ -0,0 +1,4 @@
apiVersion: v1
kind: Namespace
metadata:
name: conjurer