server/runtime: store sandbox id in container's annotations
Signed-off-by: Antonio Murdaca <runcom@redhat.com>
This commit is contained in:
parent
caae4b298a
commit
260a7adb83
1 changed files with 2 additions and 4 deletions
|
@ -44,10 +44,6 @@ func (s *Server) Version(ctx context.Context, req *pb.VersionRequest) (*pb.Versi
|
|||
func (s *Server) CreatePodSandbox(ctx context.Context, req *pb.CreatePodSandboxRequest) (*pb.CreatePodSandboxResponse, error) {
|
||||
var err error
|
||||
|
||||
if err := os.MkdirAll(s.sandboxDir, 0755); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
// process req.Name
|
||||
name := req.GetConfig().GetMetadata().GetName()
|
||||
if name == "" {
|
||||
|
@ -440,6 +436,8 @@ func (s *Server) CreateContainer(ctx context.Context, req *pb.CreateContainerReq
|
|||
}
|
||||
}
|
||||
|
||||
specgen.AddAnnotation("pod_sandbox_id", podSandboxId)
|
||||
|
||||
if containerConfig.GetPrivileged() {
|
||||
specgen.SetupPrivileged(true)
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue