mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-09-10 21:50:05 +00:00
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:
committed by
Eric Paris
parent
892942af8f
commit
6ae611aedd
@@ -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
|
||||
},
|
||||
)
|
||||
}
|
||||
|
Reference in New Issue
Block a user