Set Container Status Reason when OOM Killed
Signed-off-by: Mrunal Patel <mrunalp@gmail.com>
This commit is contained in:
parent
52b27da680
commit
ea9a90abce
4 changed files with 14 additions and 4 deletions
|
@ -98,6 +98,9 @@ func (s *Server) ContainerStatus(ctx context.Context, req *pb.ContainerStatusReq
|
|||
finished := cState.Finished.UnixNano()
|
||||
resp.Status.FinishedAt = finished
|
||||
resp.Status.ExitCode = cState.ExitCode
|
||||
if cState.OOMKilled {
|
||||
resp.Status.Reason = "OOMKilled"
|
||||
}
|
||||
}
|
||||
|
||||
resp.Status.State = rStatus
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue