Merge pull request #261 from sameo/topic/annotations

container: Store annotations under ocid/annotations
This commit is contained in:
Mrunal Patel 2016-12-12 10:43:26 -08:00 committed by GitHub
commit 05b10c27ca

View file

@ -316,6 +316,12 @@ func (s *Server) createSandboxContainer(containerID string, containerName string
} }
specgen.AddAnnotation("ocid/labels", string(labelsJSON)) specgen.AddAnnotation("ocid/labels", string(labelsJSON))
annotationsJSON, err := json.Marshal(annotations)
if err != nil {
return nil, err
}
specgen.AddAnnotation("ocid/annotations", string(annotationsJSON))
if err = s.setupSeccomp(&specgen, containerName, sb.annotations); err != nil { if err = s.setupSeccomp(&specgen, containerName, sb.annotations); err != nil {
return nil, err return nil, err
} }