aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Joe Banks <[email protected]>2021-02-10 01:07:43 +0000
committerGravatar Joe Banks <[email protected]>2021-02-10 01:07:43 +0000
commit9d8162a688023a3b5e830057b09c2ab2e132582f (patch)
tree4e98b888ef5aca33356fff100756648224bd1338
parentMerge pull request #1405 from python-discord/swfarnsworth/tag_messages (diff)
Migrate API utilities to use internal DNS routing
-rw-r--r--bot/api.py2
-rw-r--r--bot/constants.py1
-rw-r--r--config-default.yml3
3 files changed, 4 insertions, 2 deletions
diff --git a/bot/api.py b/bot/api.py
index d93f9f2ba..6ce9481f4 100644
--- a/bot/api.py
+++ b/bot/api.py
@@ -53,7 +53,7 @@ class APIClient:
@staticmethod
def _url_for(endpoint: str) -> str:
- return f"{URLs.site_schema}{URLs.site_api}/{quote_url(endpoint)}"
+ return f"{URLs.site_api_schema}{URLs.site_api}/{quote_url(endpoint)}"
async def close(self) -> None:
"""Close the aiohttp session."""
diff --git a/bot/constants.py b/bot/constants.py
index 95e22513f..91e41e334 100644
--- a/bot/constants.py
+++ b/bot/constants.py
@@ -530,6 +530,7 @@ class URLs(metaclass=YAMLGetter):
site: str
site_api: str
site_schema: str
+ site_api_schema: str
# Site endpoints
site_logs_view: str
diff --git a/config-default.yml b/config-default.yml
index d3b267159..c585151c9 100644
--- a/config-default.yml
+++ b/config-default.yml
@@ -335,9 +335,10 @@ keys:
urls:
# PyDis site vars
site: &DOMAIN "pythondiscord.com"
- site_api: &API !JOIN ["api.", *DOMAIN]
+ site_api: &API "pydis-api.default.svc.cluster.local"
site_paste: &PASTE !JOIN ["paste.", *DOMAIN]
site_schema: &SCHEMA "https://"
+ site_api_schema: "http://"
site_staff: &STAFF !JOIN ["staff.", *DOMAIN]
paste_service: !JOIN [*SCHEMA, *PASTE, "/{key}"]