restore pod annotations when restart ocid
Signed-off-by: Crazykev <crazykev@zju.edu.cn>
This commit is contained in:
parent
a742bf6a8e
commit
54a022defb
1 changed files with 6 additions and 0 deletions
|
@ -103,6 +103,11 @@ func (s *Server) loadSandbox(id string) error {
|
|||
return err
|
||||
}
|
||||
|
||||
annotations := make(map[string]string)
|
||||
if err = json.Unmarshal([]byte(m.Annotations["ocid/annotations"]), &annotations); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
sb := &sandbox{
|
||||
id: id,
|
||||
name: name,
|
||||
|
@ -111,6 +116,7 @@ func (s *Server) loadSandbox(id string) error {
|
|||
containers: oci.NewMemoryStore(),
|
||||
processLabel: processLabel,
|
||||
mountLabel: mountLabel,
|
||||
annotations: annotations,
|
||||
}
|
||||
s.addSandbox(sb)
|
||||
|
||||
|
|
Loading…
Reference in a new issue