sandbox: restore portMappings on restart
Signed-off-by: Antonio Murdaca <runcom@redhat.com>
This commit is contained in:
parent
c3f1e7aec2
commit
e5fc48a3ca
3 changed files with 15 additions and 1 deletions
|
@ -363,6 +363,11 @@ func (s *Server) RunPodSandbox(ctx context.Context, req *pb.RunPodSandboxRequest
|
|||
g.AddAnnotation(annotations.Created, created.Format(time.RFC3339Nano))
|
||||
|
||||
portMappings := convertPortMappings(req.GetConfig().GetPortMappings())
|
||||
portMappingsJSON, err := json.Marshal(portMappings)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
g.AddAnnotation(annotations.PortMappings, string(portMappingsJSON))
|
||||
|
||||
// setup cgroup settings
|
||||
cgroupParent := req.GetConfig().GetLinux().GetCgroupParent()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue