Skip to content

Commit

Permalink
fix status for completed pods in workload view (#2729)
Browse files Browse the repository at this point in the history
  • Loading branch information
prasadkatti committed Jun 16, 2024
1 parent f66bcbf commit 626bde1
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion internal/dao/workload.go
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 626bde1

Please sign in to comment.