From 6316b485ad38ae847c5e47715c89ea79d0399e3f Mon Sep 17 00:00:00 2001 From: Victor Marmol Date: Thu, 30 Apr 2015 16:48:15 -0700 Subject: [PATCH] Add SyncPod() and remove Kill/Run InContainer(). SyncPod allows us to abstract away how a pod is started and updated. It also simplifies what the runtime has to implement. --- pkg/kubelet/container/runtime.go | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/pkg/kubelet/container/runtime.go b/pkg/kubelet/container/runtime.go index f83649f2810..bb4043b6c2a 100644 --- a/pkg/kubelet/container/runtime.go +++ b/pkg/kubelet/container/runtime.go @@ -46,12 +46,10 @@ type Runtime interface { GetPods(all bool) ([]*Pod, error) // RunPod starts all the containers of a pod within a namespace. RunPod(*api.Pod, map[string]volume.Volume) error + // Syncs the running pod into the desired pod. + SyncPod(pod *api.Pod, runningPod Pod, podStatus api.PodStatus) error // KillPod kills all the containers of a pod. KillPod(pod Pod) error - // RunContainerInPod starts a container within the same namespace of a pod. - RunContainerInPod(api.Container, *api.Pod, map[string]volume.Volume) error - // KillContainerInPod kills a container in the pod. - KillContainerInPod(api.Container, *api.Pod) error // GetPodStatus retrieves the status of the pod, including the information of // all containers in the pod. GetPodStatus(*api.Pod) (*api.PodStatus, error)