Fix terminal proxy: use pod IP instead of non-existent DNS
All checks were successful
Build and Push Backend / build (push) Successful in 6s

- Add getPodIP() function to get pod IP from K8s API
- Update terminal proxy to use pod IP directly
- Add logging for proxy requests
- Fixes terminal showing black screen issue
This commit is contained in:
Hector Ros
2026-01-20 18:50:08 +01:00
parent 3fef6030ea
commit 209b439d26
2 changed files with 38 additions and 5 deletions

View File

@@ -261,3 +261,23 @@ export async function getPodStatus(podName: string): Promise<string | null> {
throw error
}
}
/**
* Get pod IP address
*/
export async function getPodIP(podName: string): Promise<string | null> {
const client = getK8sClient()
try {
const response = await client.readNamespacedPod({
name: podName,
namespace: 'agents'
})
return response.body.status?.podIP || null
} catch (error: any) {
if (error.statusCode === 404 || error.response?.statusCode === 404) {
return null
}
throw error
}
}