From d7bb8dc052db62bda037655c988aeb95db2e2642 Mon Sep 17 00:00:00 2001 From: iQQBot Date: Wed, 21 May 2025 12:17:16 +0000 Subject: [PATCH] [ws-manager-mk2] always update workspace pod ip --- components/ws-manager-mk2/controllers/status.go | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/components/ws-manager-mk2/controllers/status.go b/components/ws-manager-mk2/controllers/status.go index 5e5f33f1a42635..5d0d8d6efdbae8 100644 --- a/components/ws-manager-mk2/controllers/status.go +++ b/components/ws-manager-mk2/controllers/status.go @@ -109,13 +109,12 @@ func (r *WorkspaceReconciler) updateWorkspaceStatus(ctx context.Context, workspa if workspace.Status.Runtime.HostIP == "" && pod.Status.HostIP != "" { workspace.Status.Runtime.HostIP = pod.Status.HostIP } - if workspace.Status.Runtime.PodIP == "" && pod.Status.PodIP != "" { - workspace.Status.Runtime.PodIP = pod.Status.PodIP - } if workspace.Status.Runtime.PodName == "" && pod.Name != "" { workspace.Status.Runtime.PodName = pod.Name } + workspace.Status.Runtime.PodIP = pod.Status.PodIP + // Check if the node has disappeared. If so, ws-daemon has also disappeared and we need to // mark the workspace backup as failed if it didn't complete disposal yet. // Otherwise, the workspace will be stuck in the Stopping phase forever.