Skip to content

Commit 2bce70b

Browse files
authored
[ws-manager-mk2] always update workspace pod ip (#20830)
1 parent 6385d6f commit 2bce70b

File tree

1 file changed

+2
-3
lines changed
  • components/ws-manager-mk2/controllers

1 file changed

+2
-3
lines changed

components/ws-manager-mk2/controllers/status.go

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -109,13 +109,12 @@ func (r *WorkspaceReconciler) updateWorkspaceStatus(ctx context.Context, workspa
109109
if workspace.Status.Runtime.HostIP == "" && pod.Status.HostIP != "" {
110110
workspace.Status.Runtime.HostIP = pod.Status.HostIP
111111
}
112-
if workspace.Status.Runtime.PodIP == "" && pod.Status.PodIP != "" {
113-
workspace.Status.Runtime.PodIP = pod.Status.PodIP
114-
}
115112
if workspace.Status.Runtime.PodName == "" && pod.Name != "" {
116113
workspace.Status.Runtime.PodName = pod.Name
117114
}
118115

116+
workspace.Status.Runtime.PodIP = pod.Status.PodIP
117+
119118
// Check if the node has disappeared. If so, ws-daemon has also disappeared and we need to
120119
// mark the workspace backup as failed if it didn't complete disposal yet.
121120
// Otherwise, the workspace will be stuck in the Stopping phase forever.

0 commit comments

Comments
 (0)