fix status for completed pods in workload view (#2729)

mine
Prasad Katti 2024-06-16 08:46:34 -07:00 committed by GitHub
parent f66bcbf993
commit 626bde11f3
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 3 additions and 1 deletions

View File

@ -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: