Fix terminal proxy: use pod IP instead of non-existent DNS
All checks were successful
Build and Push Backend / build (push) Successful in 6s
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:
@@ -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
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user