comms: add atlas-genius bot

This commit is contained in:
Brad Stein 2026-01-30 17:17:59 -03:00
parent 86c859bc14
commit 3c63722a4b
4 changed files with 17 additions and 1 deletions

View File

@ -34,6 +34,9 @@ spec:
vault.hashicorp.com/agent-inject-secret-bot-smart-pass: "kv/data/atlas/comms/atlasbot-credentials-runtime"
vault.hashicorp.com/agent-inject-template-bot-smart-pass: |
{{- with secret "kv/data/atlas/comms/atlasbot-credentials-runtime" -}}{{ index .Data.data "bot-smart-password" }}{{- end -}}
vault.hashicorp.com/agent-inject-secret-bot-genius-pass: "kv/data/atlas/comms/atlasbot-credentials-runtime"
vault.hashicorp.com/agent-inject-template-bot-genius-pass: |
{{- with secret "kv/data/atlas/comms/atlasbot-credentials-runtime" -}}{{ index .Data.data "bot-genius-password" }}{{- end -}}
vault.hashicorp.com/agent-inject-secret-seeder-pass: "kv/data/atlas/comms/atlasbot-credentials-runtime"
vault.hashicorp.com/agent-inject-template-seeder-pass: |
{{- with secret "kv/data/atlas/comms/atlasbot-credentials-runtime" -}}{{ index .Data.data "seeder-password" }}{{- end -}}
@ -87,8 +90,10 @@ spec:
value: atlas-quick
- name: BOT_USER_SMART
value: atlas-smart
- name: BOT_USER_GENIUS
value: atlas-genius
- name: BOT_MENTIONS
value: atlas-quick,atlas-smart
value: atlas-quick,atlas-smart,atlas-genius
- name: OLLAMA_URL
value: http://ollama.ai.svc.cluster.local:11434
- name: OLLAMA_MODEL

View File

@ -89,6 +89,7 @@ spec:
ensure_key "comms/atlasbot-credentials-runtime" "bot-password" >/dev/null
ensure_key "comms/atlasbot-credentials-runtime" "bot-quick-password" >/dev/null
ensure_key "comms/atlasbot-credentials-runtime" "bot-smart-password" >/dev/null
ensure_key "comms/atlasbot-credentials-runtime" "bot-genius-password" >/dev/null
ensure_key "comms/atlasbot-credentials-runtime" "seeder-password" >/dev/null
SYN_PASS="$(ensure_key "comms/synapse-db" "POSTGRES_PASSWORD")"

View File

@ -103,6 +103,8 @@ spec:
value: atlas-quick
- name: BOT_USER_SMART
value: atlas-smart
- name: BOT_USER_GENIUS
value: atlas-genius
command:
- /bin/sh
- -c
@ -245,8 +247,10 @@ spec:
token = admin_token()
bot_quick = os.environ.get("BOT_USER_QUICK", "")
bot_smart = os.environ.get("BOT_USER_SMART", "")
bot_genius = os.environ.get("BOT_USER_GENIUS", "")
bot_quick_pass = os.environ.get("BOT_PASS_QUICK", "")
bot_smart_pass = os.environ.get("BOT_PASS_SMART", "")
bot_genius_pass = os.environ.get("BOT_PASS_GENIUS", "") or bot_smart_pass
ensure_user(token, os.environ["SEEDER_USER"], os.environ["SEEDER_PASS"])
ensure_user(token, os.environ["BOT_USER"], os.environ["BOT_PASS"])
@ -254,4 +258,6 @@ spec:
ensure_user(token, bot_quick, bot_quick_pass)
if bot_smart and bot_smart_pass:
ensure_user(token, bot_smart, bot_smart_pass)
if bot_genius and bot_genius_pass:
ensure_user(token, bot_genius, bot_genius_pass)
PY

View File

@ -24,9 +24,13 @@ export LIVEKIT_SECRET="${LIVEKIT_API_SECRET}"
export BOT_PASS="$(read_secret bot-pass)"
export BOT_PASS_QUICK="$(read_optional bot-quick-pass)"
export BOT_PASS_SMART="$(read_optional bot-smart-pass)"
export BOT_PASS_GENIUS="$(read_optional bot-genius-pass)"
if [ -z "${BOT_PASS_SMART}" ]; then
export BOT_PASS_SMART="${BOT_PASS}"
fi
if [ -z "${BOT_PASS_GENIUS}" ]; then
export BOT_PASS_GENIUS="${BOT_PASS_SMART}"
fi
export SEEDER_PASS="$(read_secret seeder-pass)"
export CHAT_API_KEY="$(read_secret chat-matrix)"