Remove BoundPods from Kubelet

This commit is contained in:
Wojciech Tyczynski
2015-03-13 14:19:07 +01:00
parent 972a3b1998
commit 5d95e9e671
27 changed files with 193 additions and 224 deletions

View File

@@ -39,12 +39,8 @@ func init() {
*out = *in.Copy()
return nil
},
// Convert ContainerManifest to BoundPod
//
// This function generates a dummy selfLink using the same method as the
// boundPod registry, in order for the Kubelet to work with well-formed
// boundPods during the integration test.
func(in *ContainerManifest, out *BoundPod, s conversion.Scope) error {
// Convert ContainerManifest to Pod
func(in *ContainerManifest, out *Pod, s conversion.Scope) error {
out.Spec.Containers = in.Containers
out.Spec.Volumes = in.Volumes
out.Spec.RestartPolicy = in.RestartPolicy
@@ -53,12 +49,12 @@ func init() {
out.UID = in.UUID
if in.ID != "" {
out.SelfLink = "/api/v1beta1/boundPods/" + in.ID
out.SelfLink = "/api/v1beta1/pods/" + in.ID
}
return nil
},
func(in *BoundPod, out *ContainerManifest, s conversion.Scope) error {
func(in *Pod, out *ContainerManifest, s conversion.Scope) error {
out.Containers = in.Spec.Containers
out.Volumes = in.Spec.Volumes
out.RestartPolicy = in.Spec.RestartPolicy
@@ -70,7 +66,7 @@ func init() {
},
// ContainerManifestList
func(in *ContainerManifestList, out *BoundPods, s conversion.Scope) error {
func(in *ContainerManifestList, out *PodList, s conversion.Scope) error {
if err := s.Convert(&in.Items, &out.Items, 0); err != nil {
return err
}
@@ -80,7 +76,7 @@ func init() {
}
return nil
},
func(in *BoundPods, out *ContainerManifestList, s conversion.Scope) error {
func(in *PodList, out *ContainerManifestList, s conversion.Scope) error {
if err := s.Convert(&in.Items, &out.Items, 0); err != nil {
return err
}