From 059f4cd291f84cc50ada4f818cfdd85783732b81 Mon Sep 17 00:00:00 2001 From: Brad Stein Date: Sun, 21 Dec 2025 01:16:17 -0300 Subject: [PATCH] fix(ai): query ai namespace instead of serviceaccount namespace --- backend/app.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/backend/app.py b/backend/app.py index d1544c9..da1e323 100644 --- a/backend/app.py +++ b/backend/app.py @@ -216,10 +216,8 @@ def _discover_ai_meta() -> dict[str, str]: try: token = token_path.read_text().strip() - namespace = ns_path.read_text().strip() or AI_K8S_NAMESPACE - api_server = os.getenv("KUBERNETES_SERVICE_HOST", "kubernetes.default.svc") - api_port = os.getenv("KUBERNETES_SERVICE_PORT", "443") - base_url = f"https://{api_server}:{api_port}" + namespace = AI_K8S_NAMESPACE + base_url = "https://kubernetes.default.svc" pod_url = f"{base_url}/api/v1/namespaces/{namespace}/pods?labelSelector={AI_K8S_LABEL}" with httpx.Client(verify=str(ca_path), timeout=HTTP_CHECK_TIMEOUT_SEC, headers={"Authorization": f"Bearer {token}"}) as client: