From 626bde11f31e08cf8081bced7d911f6d121582fc Mon Sep 17 00:00:00 2001 From: Prasad Katti Date: Sun, 16 Jun 2024 08:46:34 -0700 Subject: [PATCH] fix status for completed pods in workload view (#2729) --- internal/dao/workload.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/internal/dao/workload.go b/internal/dao/workload.go index dfe4aa05b4..604c6ca9ad 100644 --- a/internal/dao/workload.go +++ b/internal/dao/workload.go @@ -158,7 +158,9 @@ func readiness(gvr client.GVR, r metav1.TableRow, h []metav1.TableColumnDefiniti func status(gvr client.GVR, r metav1.TableRow, h []metav1.TableColumnDefinition) string { switch gvr { case PodGVR: - if !isReady(r.Cells[indexOf("Ready", h)].(string)) || r.Cells[indexOf("Status", h)] != render.PhaseRunning { + if status := r.Cells[indexOf("Status", h)]; status == render.PhaseCompleted { + return StatusOK + } else if !isReady(r.Cells[indexOf("Ready", h)].(string)) || status != render.PhaseRunning { return DegradedStatus } case DpGVR, StsGVR: