From 681dbf3fc128f41feea2ea12d5a11c551e9f7565 Mon Sep 17 00:00:00 2001 From: Taha Yassine Kraiem Date: Fri, 7 Apr 2023 12:05:18 +0100 Subject: [PATCH] feat(chalice): fixed custom namespaces --- api/chalicelib/core/health.py | 4 +--- ee/api/chalicelib/core/health.py | 4 +--- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/api/chalicelib/core/health.py b/api/chalicelib/core/health.py index c7e67734d..f1fec41fa 100644 --- a/api/chalicelib/core/health.py +++ b/api/chalicelib/core/health.py @@ -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 = { diff --git a/ee/api/chalicelib/core/health.py b/ee/api/chalicelib/core/health.py index b1cd6ad58..70ecdd674 100644 --- a/ee/api/chalicelib/core/health.py +++ b/ee/api/chalicelib/core/health.py @@ -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 = {