comms: add atlas-genius bot
This commit is contained in:
parent
86c859bc14
commit
3c63722a4b
@ -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-secret-bot-smart-pass: "kv/data/atlas/comms/atlasbot-credentials-runtime"
|
||||||
vault.hashicorp.com/agent-inject-template-bot-smart-pass: |
|
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 -}}
|
{{- 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-secret-seeder-pass: "kv/data/atlas/comms/atlasbot-credentials-runtime"
|
||||||
vault.hashicorp.com/agent-inject-template-seeder-pass: |
|
vault.hashicorp.com/agent-inject-template-seeder-pass: |
|
||||||
{{- with secret "kv/data/atlas/comms/atlasbot-credentials-runtime" -}}{{ index .Data.data "seeder-password" }}{{- end -}}
|
{{- with secret "kv/data/atlas/comms/atlasbot-credentials-runtime" -}}{{ index .Data.data "seeder-password" }}{{- end -}}
|
||||||
@ -87,8 +90,10 @@ spec:
|
|||||||
value: atlas-quick
|
value: atlas-quick
|
||||||
- name: BOT_USER_SMART
|
- name: BOT_USER_SMART
|
||||||
value: atlas-smart
|
value: atlas-smart
|
||||||
|
- name: BOT_USER_GENIUS
|
||||||
|
value: atlas-genius
|
||||||
- name: BOT_MENTIONS
|
- name: BOT_MENTIONS
|
||||||
value: atlas-quick,atlas-smart
|
value: atlas-quick,atlas-smart,atlas-genius
|
||||||
- name: OLLAMA_URL
|
- name: OLLAMA_URL
|
||||||
value: http://ollama.ai.svc.cluster.local:11434
|
value: http://ollama.ai.svc.cluster.local:11434
|
||||||
- name: OLLAMA_MODEL
|
- name: OLLAMA_MODEL
|
||||||
|
|||||||
@ -89,6 +89,7 @@ spec:
|
|||||||
ensure_key "comms/atlasbot-credentials-runtime" "bot-password" >/dev/null
|
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-quick-password" >/dev/null
|
||||||
ensure_key "comms/atlasbot-credentials-runtime" "bot-smart-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
|
ensure_key "comms/atlasbot-credentials-runtime" "seeder-password" >/dev/null
|
||||||
|
|
||||||
SYN_PASS="$(ensure_key "comms/synapse-db" "POSTGRES_PASSWORD")"
|
SYN_PASS="$(ensure_key "comms/synapse-db" "POSTGRES_PASSWORD")"
|
||||||
|
|||||||
@ -103,6 +103,8 @@ spec:
|
|||||||
value: atlas-quick
|
value: atlas-quick
|
||||||
- name: BOT_USER_SMART
|
- name: BOT_USER_SMART
|
||||||
value: atlas-smart
|
value: atlas-smart
|
||||||
|
- name: BOT_USER_GENIUS
|
||||||
|
value: atlas-genius
|
||||||
command:
|
command:
|
||||||
- /bin/sh
|
- /bin/sh
|
||||||
- -c
|
- -c
|
||||||
@ -245,8 +247,10 @@ spec:
|
|||||||
token = admin_token()
|
token = admin_token()
|
||||||
bot_quick = os.environ.get("BOT_USER_QUICK", "")
|
bot_quick = os.environ.get("BOT_USER_QUICK", "")
|
||||||
bot_smart = os.environ.get("BOT_USER_SMART", "")
|
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_quick_pass = os.environ.get("BOT_PASS_QUICK", "")
|
||||||
bot_smart_pass = os.environ.get("BOT_PASS_SMART", "")
|
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["SEEDER_USER"], os.environ["SEEDER_PASS"])
|
||||||
ensure_user(token, os.environ["BOT_USER"], os.environ["BOT_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)
|
ensure_user(token, bot_quick, bot_quick_pass)
|
||||||
if bot_smart and bot_smart_pass:
|
if bot_smart and bot_smart_pass:
|
||||||
ensure_user(token, bot_smart, 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
|
PY
|
||||||
|
|||||||
@ -24,9 +24,13 @@ export LIVEKIT_SECRET="${LIVEKIT_API_SECRET}"
|
|||||||
export BOT_PASS="$(read_secret bot-pass)"
|
export BOT_PASS="$(read_secret bot-pass)"
|
||||||
export BOT_PASS_QUICK="$(read_optional bot-quick-pass)"
|
export BOT_PASS_QUICK="$(read_optional bot-quick-pass)"
|
||||||
export BOT_PASS_SMART="$(read_optional bot-smart-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
|
if [ -z "${BOT_PASS_SMART}" ]; then
|
||||||
export BOT_PASS_SMART="${BOT_PASS}"
|
export BOT_PASS_SMART="${BOT_PASS}"
|
||||||
fi
|
fi
|
||||||
|
if [ -z "${BOT_PASS_GENIUS}" ]; then
|
||||||
|
export BOT_PASS_GENIUS="${BOT_PASS_SMART}"
|
||||||
|
fi
|
||||||
export SEEDER_PASS="$(read_secret seeder-pass)"
|
export SEEDER_PASS="$(read_secret seeder-pass)"
|
||||||
|
|
||||||
export CHAT_API_KEY="$(read_secret chat-matrix)"
|
export CHAT_API_KEY="$(read_secret chat-matrix)"
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user