diff --git a/services/communication/atlasbot-deployment.yaml b/services/communication/atlasbot-deployment.yaml index a0b3f05..0450f3e 100644 --- a/services/communication/atlasbot-deployment.yaml +++ b/services/communication/atlasbot-deployment.yaml @@ -29,7 +29,7 @@ spec: - name: MATRIX_BASE value: http://othrys-synapse-matrix-synapse:8008 - name: AUTH_BASE - value: http://othrys-synapse-matrix-synapse:8008 + value: http://matrix-authentication-service:8080 - name: BOT_USER value: atlasbot - name: BOT_PASS diff --git a/services/communication/guest-name-job.yaml b/services/communication/guest-name-job.yaml index f6f1469..8d8149e 100644 --- a/services/communication/guest-name-job.yaml +++ b/services/communication/guest-name-job.yaml @@ -19,6 +19,8 @@ spec: env: - name: SYNAPSE_BASE value: http://othrys-synapse-matrix-synapse:8008 + - name: AUTH_BASE + value: http://matrix-authentication-service:8080 - name: SEEDER_USER value: othrys-seeder - name: SEEDER_PASS @@ -39,10 +41,11 @@ spec: NOUN = ["otter","falcon","comet","ember","grove","harbor","meadow","raven","river","summit"] BASE = os.environ["SYNAPSE_BASE"] + AUTH_BASE = os.environ.get("AUTH_BASE", BASE) OTHRYS = "!orejZnVfvbAmwQDYba:live.bstein.dev" def login(user, password): - r = requests.post(f"{BASE}/_matrix/client/v3/login", json={ + r = requests.post(f"{AUTH_BASE}/_matrix/client/v3/login", json={ "type": "m.login.password", "identifier": {"type": "m.id.user", "user": user}, "password": password, diff --git a/services/communication/pin-othrys-job.yaml b/services/communication/pin-othrys-job.yaml index a03e43d..a45f37a 100644 --- a/services/communication/pin-othrys-job.yaml +++ b/services/communication/pin-othrys-job.yaml @@ -22,6 +22,8 @@ spec: env: - name: SYNAPSE_BASE value: http://othrys-synapse-matrix-synapse:8008 + - name: AUTH_BASE + value: http://matrix-authentication-service:8080 - name: SEEDER_USER value: othrys-seeder - name: SEEDER_PASS @@ -39,6 +41,7 @@ spec: import os, requests, urllib.parse BASE = os.environ["SYNAPSE_BASE"] + AUTH_BASE = os.environ.get("AUTH_BASE", BASE) ROOM_ALIAS = "#othrys:live.bstein.dev" MESSAGE = ( "Invite guests: share https://live.bstein.dev/#/room/#othrys:live.bstein.dev?action=join " @@ -48,7 +51,7 @@ spec: def auth(token): return {"Authorization": f"Bearer {token}"} def login(user, password): - r = requests.post(f"{BASE}/_matrix/client/v3/login", json={ + r = requests.post(f"{AUTH_BASE}/_matrix/client/v3/login", json={ "type": "m.login.password", "identifier": {"type": "m.id.user", "user": user}, "password": password, diff --git a/services/communication/seed-othrys-room.yaml b/services/communication/seed-othrys-room.yaml index 09dc1e8..06be4fb 100644 --- a/services/communication/seed-othrys-room.yaml +++ b/services/communication/seed-othrys-room.yaml @@ -20,6 +20,8 @@ spec: env: - name: SYNAPSE_BASE value: http://othrys-synapse-matrix-synapse:8008 + - name: AUTH_BASE + value: http://matrix-authentication-service:8080 - name: SEEDER_USER value: othrys-seeder - name: SEEDER_PASS @@ -44,9 +46,10 @@ spec: import os, requests, urllib.parse BASE = os.environ["SYNAPSE_BASE"] + AUTH_BASE = os.environ.get("AUTH_BASE", BASE) def login(user, password): - r = requests.post(f"{BASE}/_matrix/client/v3/login", json={ + r = requests.post(f"{AUTH_BASE}/_matrix/client/v3/login", json={ "type": "m.login.password", "identifier": {"type": "m.id.user", "user": user}, "password": password,