Merge pull request #185 from Crazykev/restore-annotation
restore pod annotations when restart ocid
This commit is contained in:
commit
23d86cd866
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