mirror of https://github.com/k3s-io/k3s
Merge pull request #7657 from yujuhong/docker_runtime
Removes RunPod in the Runtime interfacepull/6/head
commit
c5a86387a4
|
@ -128,11 +128,11 @@ func (f *FakeRuntime) GetPods(all bool) ([]*Pod, error) {
|
|||
return f.Podlist, f.Err
|
||||
}
|
||||
|
||||
func (f *FakeRuntime) RunPod(pod *api.Pod, volumeMap map[string]volume.VolumePlugin) error {
|
||||
func (f *FakeRuntime) SyncPod(pod *api.Pod, _ Pod, _ api.PodStatus) error {
|
||||
f.Lock()
|
||||
defer f.Unlock()
|
||||
|
||||
f.CalledFunctions = append(f.CalledFunctions, "RunPod")
|
||||
f.CalledFunctions = append(f.CalledFunctions, "SyncPod")
|
||||
f.StartedPods = append(f.StartedPods, string(pod.UID))
|
||||
for _, c := range pod.Spec.Containers {
|
||||
f.StartedContainers = append(f.StartedContainers, c.Name)
|
||||
|
|
|
@ -23,7 +23,6 @@ import (
|
|||
|
||||
"github.com/GoogleCloudPlatform/kubernetes/pkg/api"
|
||||
"github.com/GoogleCloudPlatform/kubernetes/pkg/types"
|
||||
"github.com/GoogleCloudPlatform/kubernetes/pkg/volume"
|
||||
)
|
||||
|
||||
type Version interface {
|
||||
|
@ -44,8 +43,6 @@ type Runtime interface {
|
|||
// specifies whether the runtime returns all containers including those already
|
||||
// exited and dead containers (used for garbage collection).
|
||||
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.
|
||||
|
|
|
@ -54,7 +54,8 @@ const (
|
|||
maxReasonCacheEntries = 200
|
||||
)
|
||||
|
||||
// TODO(yjhong): DockerManager should implement the Runtime interface.
|
||||
// DockerManager implements the Runtime interface.
|
||||
var _ kubecontainer.Runtime = &DockerManager{}
|
||||
|
||||
type DockerManager struct {
|
||||
client DockerInterface
|
||||
|
|
Loading…
Reference in New Issue