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: