mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-09-16 14:45:28 +00:00
kubectl: Add Terminating state to PVCs
kubectl should show something when a PVC has a deletion timestamp and is waiting for deletion. This patch follows Pod - it adds Terminating state. For easier discovery of errors, finalizers are printed in `kubectl describe pvc`.
This commit is contained in:
@@ -1226,6 +1226,10 @@ func printPersistentVolumeClaim(obj *api.PersistentVolumeClaim, options printers
|
||||
}
|
||||
|
||||
phase := obj.Status.Phase
|
||||
if obj.ObjectMeta.DeletionTimestamp != nil {
|
||||
phase = "Terminating"
|
||||
}
|
||||
|
||||
storage := obj.Spec.Resources.Requests[api.ResourceStorage]
|
||||
capacity := ""
|
||||
accessModes := ""
|
||||
|
Reference in New Issue
Block a user