Populate state in pod status
Signed-off-by: Mrunal Patel <mrunalp@gmail.com>
This commit is contained in:
parent
def5ebdae7
commit
204b2a645b
1 changed files with 6 additions and 0 deletions
|
@ -331,6 +331,11 @@ func (s *Server) PodSandboxStatus(ctx context.Context, req *pb.PodSandboxStatusR
|
|||
ip = ""
|
||||
}
|
||||
|
||||
rStatus := pb.PodSandBoxState_NOTREADY
|
||||
if cState.Status == "running" {
|
||||
rStatus = pb.PodSandBoxState_READY
|
||||
}
|
||||
|
||||
return &pb.PodSandboxStatusResponse{
|
||||
Status: &pb.PodSandboxStatus{
|
||||
Id: sbID,
|
||||
|
@ -341,6 +346,7 @@ func (s *Server) PodSandboxStatus(ctx context.Context, req *pb.PodSandboxStatusR
|
|||
},
|
||||
},
|
||||
Network: &pb.PodSandboxNetworkStatus{Ip: &ip},
|
||||
State: &rStatus,
|
||||
},
|
||||
}, nil
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue