[FIX] nil pointer dereference

This commit is contained in:
GLYASAI 2019-08-26 12:53:12 +08:00
parent 0cfa50f9bf
commit 80a7443e7b

View File

@ -162,7 +162,7 @@ func describeStatus(state corev1.ContainerState, podContainer *pb.PodContainer)
case state.Terminated != nil:
podContainer.State = "Terminated"
if state.Terminated.Reason != "" {
podContainer.Reason = state.Waiting.Reason
podContainer.Reason = state.Terminated.Reason
}
default:
podContainer.State = "Waiting"