mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-10-22 06:59:03 +00:00
Merge pull request #21351 from smarterclayton/optional_pod_status
Auto commit by PR queue bot
This commit is contained in:
@@ -455,7 +455,6 @@ func describePod(pod *api.Pod, events *api.EventList) (string, error) {
|
||||
return tabbedString(func(out io.Writer) error {
|
||||
fmt.Fprintf(out, "Name:\t%s\n", pod.Name)
|
||||
fmt.Fprintf(out, "Namespace:\t%s\n", pod.Namespace)
|
||||
fmt.Fprintf(out, "Image(s):\t%s\n", makeImageList(&pod.Spec))
|
||||
fmt.Fprintf(out, "Node:\t%s\n", pod.Spec.NodeName+"/"+pod.Status.HostIP)
|
||||
if pod.Status.StartTime != nil {
|
||||
fmt.Fprintf(out, "Start Time:\t%s\n", pod.Status.StartTime.Time.Format(time.RFC1123Z))
|
||||
@@ -467,8 +466,12 @@ func describePod(pod *api.Pod, events *api.EventList) (string, error) {
|
||||
} else {
|
||||
fmt.Fprintf(out, "Status:\t%s\n", string(pod.Status.Phase))
|
||||
}
|
||||
fmt.Fprintf(out, "Reason:\t%s\n", pod.Status.Reason)
|
||||
fmt.Fprintf(out, "Message:\t%s\n", pod.Status.Message)
|
||||
if len(pod.Status.Reason) > 0 {
|
||||
fmt.Fprintf(out, "Reason:\t%s\n", pod.Status.Reason)
|
||||
}
|
||||
if len(pod.Status.Message) > 0 {
|
||||
fmt.Fprintf(out, "Message:\t%s\n", pod.Status.Message)
|
||||
}
|
||||
fmt.Fprintf(out, "IP:\t%s\n", pod.Status.PodIP)
|
||||
fmt.Fprintf(out, "Controllers:\t%s\n", printControllers(pod.Annotations))
|
||||
fmt.Fprintf(out, "Containers:\n")
|
||||
|
Reference in New Issue
Block a user