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 = ""
|
ip = ""
|
||||||
}
|
}
|
||||||
|
|
||||||
|
rStatus := pb.PodSandBoxState_NOTREADY
|
||||||
|
if cState.Status == "running" {
|
||||||
|
rStatus = pb.PodSandBoxState_READY
|
||||||
|
}
|
||||||
|
|
||||||
return &pb.PodSandboxStatusResponse{
|
return &pb.PodSandboxStatusResponse{
|
||||||
Status: &pb.PodSandboxStatus{
|
Status: &pb.PodSandboxStatus{
|
||||||
Id: sbID,
|
Id: sbID,
|
||||||
|
@ -341,6 +346,7 @@ func (s *Server) PodSandboxStatus(ctx context.Context, req *pb.PodSandboxStatusR
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
Network: &pb.PodSandboxNetworkStatus{Ip: &ip},
|
Network: &pb.PodSandboxNetworkStatus{Ip: &ip},
|
||||||
|
State: &rStatus,
|
||||||
},
|
},
|
||||||
}, nil
|
}, nil
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue