Compare commits
4 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| a802b90617 | |||
| aeb9bb5940 | |||
| f968eb0340 | |||
| f754831f54 |
+16
-1
@@ -90,11 +90,26 @@ read -rs -p "Hasło do aplikacji (APP_PASSWORD): " APP_PASSWORD; echo
|
|||||||
|
|
||||||
kubectl -n astrololo create secret generic astrololo-auth \
|
kubectl -n astrololo create secret generic astrololo-auth \
|
||||||
--from-literal=APP_PASSWORD="$APP_PASSWORD" \
|
--from-literal=APP_PASSWORD="$APP_PASSWORD" \
|
||||||
--from-literal=INTERNAL_TOKEN="$(openssl rand -hex 32)"
|
--from-literal=INTERNAL_TOKEN="$(openssl rand -hex 32)" \
|
||||||
|
--from-literal=SESSION_SECRET="$(openssl rand -hex 32)"
|
||||||
|
|
||||||
unset APP_PASSWORD
|
unset APP_PASSWORD
|
||||||
```
|
```
|
||||||
|
|
||||||
|
`SESSION_SECRET` podpisuje ciasteczka sesji (LOG-34). **Pod bez niego celowo nie
|
||||||
|
wstanie**: usługa z kontami, ale bez klucza, nie odróżniłaby ważnej sesji od
|
||||||
|
podrobionej. Nikt go nigdy nie musi oglądać.
|
||||||
|
|
||||||
|
> **Rotacja tego klucza wylogowuje WSZYSTKICH.** To nie usterka, tylko awaryjny
|
||||||
|
> wyłącznik: gdy podejrzewasz, że ktoś przechwycił cudzą sesję, podmiana klucza
|
||||||
|
> unieważnia je wszystkie naraz.
|
||||||
|
>
|
||||||
|
> ```bash
|
||||||
|
> kubectl -n astrololo patch secret astrololo-auth --type=json \
|
||||||
|
> -p="[{\"op\":\"replace\",\"path\":\"/data/SESSION_SECRET\",\"value\":\"$(openssl rand -hex 32 | base64 | tr -d '\n')\"}]"
|
||||||
|
> kubectl -n astrololo rollout restart deploy/presentation
|
||||||
|
> ```
|
||||||
|
|
||||||
`INTERNAL_TOKEN` jest losowany i **nikt go nigdy nie musi oglądać** — służy tylko
|
`INTERNAL_TOKEN` jest losowany i **nikt go nigdy nie musi oglądać** — służy tylko
|
||||||
usługom do rozmowy między sobą. `APP_PASSWORD` wpisujesz w przeglądarce
|
usługom do rozmowy między sobą. `APP_PASSWORD` wpisujesz w przeglądarce
|
||||||
(użytkownik: `astrololo`, zmienny przez `APP_USER` w `presentation.yaml`).
|
(użytkownik: `astrololo`, zmienny przez `APP_USER` w `presentation.yaml`).
|
||||||
|
|||||||
@@ -11,10 +11,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: 71bb3b9c
|
newTag: f0d07ee8
|
||||||
- name: gitea.czernobog.pl/gitea/astrololo-logic
|
- name: gitea.czernobog.pl/gitea/astrololo-logic
|
||||||
newTag: 71bb3b9c
|
newTag: f0d07ee8
|
||||||
- name: gitea.czernobog.pl/gitea/astrololo-render
|
- name: gitea.czernobog.pl/gitea/astrololo-render
|
||||||
newTag: latest
|
newTag: latest
|
||||||
- name: gitea.czernobog.pl/gitea/astrololo-presentation
|
- name: gitea.czernobog.pl/gitea/astrololo-presentation
|
||||||
newTag: 71bb3b9c
|
newTag: f0d07ee8
|
||||||
|
|||||||
@@ -32,6 +32,13 @@ spec:
|
|||||||
secretKeyRef: { name: astrololo-auth, key: INTERNAL_TOKEN }
|
secretKeyRef: { name: astrololo-auth, key: INTERNAL_TOKEN }
|
||||||
- name: APP_USER
|
- name: APP_USER
|
||||||
value: "astrololo"
|
value: "astrololo"
|
||||||
|
# Klucz podpisu ciasteczek sesji (LOG-34). WYMAGANY — pod bez niego
|
||||||
|
# celowo nie wstaje: usługa z kontami, ale bez klucza, nie umiałaby
|
||||||
|
# odróżnić ważnej sesji od podrobionej. Rotacja tego klucza WYLOGOWUJE
|
||||||
|
# WSZYSTKICH, i tak ma być — to jest awaryjny wyłącznik.
|
||||||
|
- name: SESSION_SECRET
|
||||||
|
valueFrom:
|
||||||
|
secretKeyRef: { name: astrololo-auth, key: SESSION_SECRET }
|
||||||
- name: RATE_LIMIT_PER_MIN
|
- name: RATE_LIMIT_PER_MIN
|
||||||
value: "120" # 0 = bez limitu
|
value: "120" # 0 = bez limitu
|
||||||
# Aplikacja stoi za Ingressem, więc bezpośrednim rozmówcą jest zawsze
|
# Aplikacja stoi za Ingressem, więc bezpośrednim rozmówcą jest zawsze
|
||||||
|
|||||||
@@ -31,6 +31,19 @@ spec:
|
|||||||
# Where the librarian sends THIS bot's results/pongs back to (its own
|
# Where the librarian sends THIS bot's results/pongs back to (its own
|
||||||
# NodePort). Lets one librarian serve both bots - see deploy-bot.yaml.
|
# NodePort). Lets one librarian serve both bots - see deploy-bot.yaml.
|
||||||
- { name: CONJURER_SELF_CALLBACK, value: "http://192.168.1.73:32442" }
|
- { name: CONJURER_SELF_CALLBACK, value: "http://192.168.1.73:32442" }
|
||||||
|
# Self-hosted models (Ollama). No API key - the endpoint IS the
|
||||||
|
# configuration, and the backend stays unselectable while unset.
|
||||||
|
# Pick a model at runtime with: $gadaj_teraz ollama <model>
|
||||||
|
# ($modele_ai lists what the server actually has pulled).
|
||||||
|
- { name: CONJURER_OLLAMA_URL, value: "http://192.168.1.72:11434" }
|
||||||
|
# The server currently has exactly one model pulled (verified via
|
||||||
|
# /v1/models): gemma4:e2b. Without this the built-in default
|
||||||
|
# (llama3.1:8b) would be requested and every reply would fail.
|
||||||
|
- { name: CONJURER_OLLAMA_MODEL, value: "gemma4:e2b" }
|
||||||
|
# Self-hosted generation is far slower than a hosted API, especially
|
||||||
|
# the first request after the model is evicted from VRAM. Applies to
|
||||||
|
# every backend, so keep it only as high as you actually need.
|
||||||
|
- { name: CONJURER_AI_TIMEOUT_SECONDS, value: "240" }
|
||||||
volumeMounts:
|
volumeMounts:
|
||||||
- { name: data, mountPath: /data }
|
- { name: data, mountPath: /data }
|
||||||
- { name: netrc, mountPath: /secrets, readOnly: true }
|
- { name: netrc, mountPath: /secrets, readOnly: true }
|
||||||
|
|||||||
@@ -51,6 +51,19 @@ spec:
|
|||||||
# query and answers results/pongs HERE - so it serves this bot AND the
|
# query and answers results/pongs HERE - so it serves this bot AND the
|
||||||
# test bot from one instance, no CONJURER_MAIN_BOT repointing needed.
|
# test bot from one instance, no CONJURER_MAIN_BOT repointing needed.
|
||||||
- { name: CONJURER_SELF_CALLBACK, value: "http://192.168.1.73:32443" }
|
- { name: CONJURER_SELF_CALLBACK, value: "http://192.168.1.73:32443" }
|
||||||
|
# Self-hosted models (Ollama). No API key - the endpoint IS the
|
||||||
|
# configuration, and the backend stays unselectable while unset.
|
||||||
|
# Pick a model at runtime with: $gadaj_teraz ollama <model>
|
||||||
|
# ($modele_ai lists what the server actually has pulled).
|
||||||
|
- { name: CONJURER_OLLAMA_URL, value: "http://192.168.1.72:11434" }
|
||||||
|
# The server currently has exactly one model pulled (verified via
|
||||||
|
# /v1/models): gemma4:e2b. Without this the built-in default
|
||||||
|
# (llama3.1:8b) would be requested and every reply would fail.
|
||||||
|
- { name: CONJURER_OLLAMA_MODEL, value: "gemma4:e2b" }
|
||||||
|
# Self-hosted generation is far slower than a hosted API, especially
|
||||||
|
# the first request after the model is evicted from VRAM. Applies to
|
||||||
|
# every backend, so keep it only as high as you actually need.
|
||||||
|
- { name: CONJURER_AI_TIMEOUT_SECONDS, value: "240" }
|
||||||
volumeMounts:
|
volumeMounts:
|
||||||
- { name: data, mountPath: /data }
|
- { name: data, mountPath: /data }
|
||||||
- { name: netrc, mountPath: /secrets, readOnly: true }
|
- { name: netrc, mountPath: /secrets, readOnly: true }
|
||||||
|
|||||||
Reference in New Issue
Block a user