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
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
annotations := make(map[string]string)
|
||||||
|
if err = json.Unmarshal([]byte(m.Annotations["ocid/annotations"]), &annotations); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
sb := &sandbox{
|
sb := &sandbox{
|
||||||
id: id,
|
id: id,
|
||||||
name: name,
|
name: name,
|
||||||
|
@ -111,6 +116,7 @@ func (s *Server) loadSandbox(id string) error {
|
||||||
containers: oci.NewMemoryStore(),
|
containers: oci.NewMemoryStore(),
|
||||||
processLabel: processLabel,
|
processLabel: processLabel,
|
||||||
mountLabel: mountLabel,
|
mountLabel: mountLabel,
|
||||||
|
annotations: annotations,
|
||||||
}
|
}
|
||||||
s.addSandbox(sb)
|
s.addSandbox(sb)
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue