From b7f226062c3852913b740b5c38c426785dfc1872 Mon Sep 17 00:00:00 2001 From: migatu Date: Sun, 2 Aug 2026 17:04:57 +0200 Subject: [PATCH] =?UTF-8?q?conjurer:=20napraw=20drog=C4=99=20powrotn=C4=85?= =?UTF-8?q?=20librarian/musician=20->=20bot?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- conjurer/bot.yaml | 5 ++++- conjurer/librarian.yaml | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/conjurer/bot.yaml b/conjurer/bot.yaml index e7533ab..4ac4645 100644 --- a/conjurer/bot.yaml +++ b/conjurer/bot.yaml @@ -53,4 +53,7 @@ metadata: { name: bot, namespace: conjurer } spec: type: NodePort # radio/musician z Dockera muszą go dosięgnąć selector: { app: bot } - ports: [{ port: 5000, targetPort: 5000 }] \ No newline at end of file + # 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 }] \ No newline at end of file diff --git a/conjurer/librarian.yaml b/conjurer/librarian.yaml index 2535b3a..b3850fd 100644 --- a/conjurer/librarian.yaml +++ b/conjurer/librarian.yaml @@ -22,7 +22,10 @@ spec: - { name: CONJURER_LIBRARIAN_MAXTHREADS, value: "40" } - { name: CONJURER_CROSSREF_MAILTO, value: "mtuszowski@gmail.com" } - { name: CONJURER_LIBRARIAN_CHUNK, value: "_chunk.txt" } - - { name: CONJURER_MAIN_BOT, value: "http://192.168.1.73:32442" } + # 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" } -- 2.52.0