Merge pull request #388 from GLYASAI/podstatus

[FIX] nil pointer dereference
This commit is contained in:
barnettZQG 2019-08-26 00:15:08 -05:00 committed by GitHub
commit 2ee91e7c13
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -169,7 +169,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"