comms: stop seeding atlas bots in synapse job

This commit is contained in:
Brad Stein 2026-01-28 13:18:44 -03:00
parent 1186722bb5
commit 976b5994dd

View File

@ -27,12 +27,6 @@ spec:
vault.hashicorp.com/agent-inject-secret-bot-pass: "kv/data/atlas/comms/atlasbot-credentials-runtime"
vault.hashicorp.com/agent-inject-template-bot-pass: |
{{- with secret "kv/data/atlas/comms/atlasbot-credentials-runtime" -}}{{ index .Data.data "bot-password" }}{{- end -}}
vault.hashicorp.com/agent-inject-secret-bot-quick-pass: "kv/data/atlas/comms/atlasbot-credentials-runtime"
vault.hashicorp.com/agent-inject-template-bot-quick-pass: |
{{- with secret "kv/data/atlas/comms/atlasbot-credentials-runtime" -}}{{ index .Data.data "bot-quick-password" }}{{- end -}}
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-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 -}}
@ -88,12 +82,6 @@ spec:
value: synapse
- name: SEEDER_USER
value: othrys-seeder
- name: BOT_USER
value: atlas-smart
- name: BOT_USER_QUICK
value: atlas-quick
- name: BOT_USER_SMART
value: atlas-smart
command:
- /bin/sh
- -c
@ -151,12 +139,8 @@ spec:
cur.execute(query, [values[c] for c in columns])
seeder_user = os.environ["SEEDER_USER"]
bot_user = os.environ["BOT_USER"]
bot_quick = os.environ.get("BOT_USER_QUICK", "").strip()
bot_smart = os.environ.get("BOT_USER_SMART", "").strip()
server = "live.bstein.dev"
seeder_id = f"@{seeder_user}:{server}"
bot_id = f"@{bot_user}:{server}"
conn = psycopg2.connect(
host=os.environ["PGHOST"],
@ -170,13 +154,6 @@ spec:
with conn.cursor() as cur:
cols = get_cols(cur)
upsert_user(cur, cols, seeder_id, os.environ["SEEDER_PASS"], True)
upsert_user(cur, cols, bot_id, os.environ["BOT_PASS"], False)
if bot_quick and os.environ.get("BOT_PASS_QUICK"):
quick_id = f"@{bot_quick}:{server}"
upsert_user(cur, cols, quick_id, os.environ["BOT_PASS_QUICK"], False)
if bot_smart and os.environ.get("BOT_PASS_SMART"):
smart_id = f"@{bot_smart}:{server}"
upsert_user(cur, cols, smart_id, os.environ["BOT_PASS_SMART"], False)
finally:
conn.close()
PY