From 03a37e70a1ccbd4debd48feab93593ececc48b7b Mon Sep 17 00:00:00 2001 From: richardxz Date: Thu, 25 Oct 2018 03:00:56 -0400 Subject: [PATCH] add "Terminating" status in pvc's lifecycle --- pkg/models/controllers/pvcs.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/pkg/models/controllers/pvcs.go b/pkg/models/controllers/pvcs.go index 38a20dfc8..09e794888 100644 --- a/pkg/models/controllers/pvcs.go +++ b/pkg/models/controllers/pvcs.go @@ -38,8 +38,12 @@ func (ctl *PvcCtl) generateObject(item *v1.PersistentVolumeClaim) *Pvc { name := item.Name namespace := item.Namespace - status := fmt.Sprintf("%s", item.Status.Phase) createTime := item.CreationTimestamp.Time + status := fmt.Sprintf("%s", item.Status.Phase) + if item.DeletionTimestamp != nil { + status = "Terminating" + } + var capacity, storageClass, accessModeStr string if createTime.IsZero() {