feat(chalice): fixed custom namespaces

This commit is contained in:
Taha Yassine Kraiem 2023-04-07 12:05:18 +01:00
parent da6d5ae011
commit 681dbf3fc1
2 changed files with 2 additions and 6 deletions

View file

@ -10,9 +10,7 @@ from chalicelib.utils import pg_client
def app_connection_string(name, port, path):
namespace = config("POD_NAMESPACE", default="app")
conn_string = config("CLUSTER_URL", default="svc.cluster.local")
return (
"http://" + name + "." + namespace + "." + conn_string + ":" + port + "/" + path
)
return f"http://{name}.{namespace}.{conn_string}:{port}/{path}"
HEALTH_ENDPOINTS = {

View file

@ -11,9 +11,7 @@ from chalicelib.utils import pg_client, ch_client
def app_connection_string(name, port, path):
namespace = config("POD_NAMESPACE", default="app")
conn_string = config("CLUSTER_URL", default="svc.cluster.local")
return (
"http://" + name + "." + namespace + "." + conn_string + ":" + port + "/" + path
)
return f"http://{name}.{namespace}.{conn_string}:{port}/{path}"
HEALTH_ENDPOINTS = {