mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-02 08:17:26 +00:00
Fix terminated pod printing in kubectl describe
This commit is contained in:
parent
039acb8c1d
commit
62da43eef2
@ -471,7 +471,7 @@ func describePod(pod *api.Pod, rcs []api.ReplicationController, events *api.Even
|
|||||||
fmt.Fprintf(out, "Labels:\t%s\n", labels.FormatLabels(pod.Labels))
|
fmt.Fprintf(out, "Labels:\t%s\n", labels.FormatLabels(pod.Labels))
|
||||||
if pod.DeletionTimestamp != nil {
|
if pod.DeletionTimestamp != nil {
|
||||||
fmt.Fprintf(out, "Status:\tTerminating (expires %s)\n", pod.DeletionTimestamp.Time.Format(time.RFC1123Z))
|
fmt.Fprintf(out, "Status:\tTerminating (expires %s)\n", pod.DeletionTimestamp.Time.Format(time.RFC1123Z))
|
||||||
fmt.Fprintf(out, "Termination Grace Period:\t%ds\n", pod.DeletionGracePeriodSeconds)
|
fmt.Fprintf(out, "Termination Grace Period:\t%ds\n", *pod.DeletionGracePeriodSeconds)
|
||||||
} else {
|
} else {
|
||||||
fmt.Fprintf(out, "Status:\t%s\n", string(pod.Status.Phase))
|
fmt.Fprintf(out, "Status:\t%s\n", string(pod.Status.Phase))
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user