From 6743e4ff207a51d0057a4eef7dbef3c82cbd6b90 Mon Sep 17 00:00:00 2001 From: Brian Goff Date: Fri, 17 May 2019 17:01:05 -0700 Subject: [PATCH] Decouple vkubelet/* packages from providers (#626) This makes the concept of a `Provider` wholely implemented in the cli implementation in cmd/virtual-kubelet. It allows us to slim down the interfaces used in vkubelet (and vkubelet/api) to what is actually used there rather than a huge interface that is only there to serve the CLI's needs. --- eci.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/eci.go b/eci.go index 8c78835..af919a1 100644 --- a/eci.go +++ b/eci.go @@ -20,8 +20,8 @@ import ( "github.com/cpuguy83/strongerrors" "github.com/virtual-kubelet/virtual-kubelet/log" "github.com/virtual-kubelet/virtual-kubelet/manager" - "github.com/virtual-kubelet/virtual-kubelet/providers" "github.com/virtual-kubelet/virtual-kubelet/providers/alibabacloud/eci" + "github.com/virtual-kubelet/virtual-kubelet/vkubelet/api" v1 "k8s.io/api/core/v1" k8serr "k8s.io/apimachinery/pkg/api/errors" "k8s.io/apimachinery/pkg/api/resource" @@ -279,7 +279,7 @@ func (p *ECIProvider) GetPod(ctx context.Context, namespace, name string) (*v1.P } // GetContainerLogs returns the logs of a pod by name that is running inside ECI. -func (p *ECIProvider) GetContainerLogs(ctx context.Context, namespace, podName, containerName string, opts providers.ContainerLogOpts) (io.ReadCloser, error) { +func (p *ECIProvider) GetContainerLogs(ctx context.Context, namespace, podName, containerName string, opts api.ContainerLogOpts) (io.ReadCloser, error) { eciId := "" for _, cg := range p.GetCgs() { if getECITagValue(&cg, "PodName") == podName && getECITagValue(&cg, "NameSpace") == namespace { @@ -321,7 +321,7 @@ func (p *ECIProvider) GetPodFullName(namespace string, pod string) string { // RunInContainer executes a command in a container in the pod, copying data // between in/out/err and the container's stdin/stdout/stderr. -func (p *ECIProvider) RunInContainer(ctx context.Context, namespace, podName, containerName string, cmd []string, attach providers.AttachIO) error { +func (p *ECIProvider) RunInContainer(ctx context.Context, namespace, podName, containerName string, cmd []string, attach api.AttachIO) error { return nil }