Write BoundPods to etcd instead of ContainerManifestList

Rename ManifestFactory -> BoundPodFactory and change the general structure
of the call to focus on BoundPod.
This commit is contained in:
Clayton Coleman
2014-10-09 13:27:47 -04:00
committed by Eric Paris
parent 892942af8f
commit 6ae611aedd
10 changed files with 131 additions and 113 deletions

View File

@@ -61,5 +61,20 @@ func init() {
}
out.ResourceVersion = in.ResourceVersion
return nil
})
},
// Convert Pod to BoundPod
func(in *Pod, out *BoundPod, s conversion.Scope) error {
if err := s.Convert(&in.DesiredState.Manifest, out, 0); err != nil {
return err
}
// Only copy a subset of fields, and override manifest attributes with the pod
// metadata
out.UID = in.UID
out.ID = in.ID
out.Namespace = in.Namespace
out.CreationTimestamp = in.CreationTimestamp
return nil
},
)
}