mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-25 12:43:23 +00:00
Merge pull request #36200 from yujuhong/remove_logs
Automatic merge from submit-queue dockershim: remove unused GetContainerLogs method
This commit is contained in:
commit
66a7a1f961
@ -21,7 +21,6 @@ import (
|
|||||||
"io"
|
"io"
|
||||||
|
|
||||||
"github.com/golang/glog"
|
"github.com/golang/glog"
|
||||||
"k8s.io/kubernetes/pkg/api"
|
|
||||||
"k8s.io/kubernetes/pkg/apis/componentconfig"
|
"k8s.io/kubernetes/pkg/apis/componentconfig"
|
||||||
internalApi "k8s.io/kubernetes/pkg/kubelet/api"
|
internalApi "k8s.io/kubernetes/pkg/kubelet/api"
|
||||||
runtimeApi "k8s.io/kubernetes/pkg/kubelet/api/v1alpha1/runtime"
|
runtimeApi "k8s.io/kubernetes/pkg/kubelet/api/v1alpha1/runtime"
|
||||||
@ -145,8 +144,6 @@ type DockerService interface {
|
|||||||
// backward compatibility.
|
// backward compatibility.
|
||||||
type DockerLegacyService interface {
|
type DockerLegacyService interface {
|
||||||
// Supporting legacy methods for docker.
|
// Supporting legacy methods for docker.
|
||||||
GetContainerLogs(pod *api.Pod, containerID kubecontainer.ContainerID, logOptions *api.PodLogOptions, stdout, stderr io.Writer) (err error)
|
|
||||||
|
|
||||||
LegacyExec(containerID kubecontainer.ContainerID, cmd []string, stdin io.Reader, stdout, stderr io.WriteCloser, tty bool, resize <-chan term.Size) error
|
LegacyExec(containerID kubecontainer.ContainerID, cmd []string, stdin io.Reader, stdout, stderr io.WriteCloser, tty bool, resize <-chan term.Size) error
|
||||||
LegacyAttach(id kubecontainer.ContainerID, stdin io.Reader, stdout, stderr io.WriteCloser, tty bool, resize <-chan term.Size) error
|
LegacyAttach(id kubecontainer.ContainerID, stdin io.Reader, stdout, stderr io.WriteCloser, tty bool, resize <-chan term.Size) error
|
||||||
LegacyPortForward(sandboxID string, port uint16, stream io.ReadWriteCloser) error
|
LegacyPortForward(sandboxID string, port uint16, stream io.ReadWriteCloser) error
|
||||||
|
@ -19,9 +19,7 @@ package dockershim
|
|||||||
import (
|
import (
|
||||||
"io"
|
"io"
|
||||||
|
|
||||||
"k8s.io/kubernetes/pkg/api"
|
|
||||||
kubecontainer "k8s.io/kubernetes/pkg/kubelet/container"
|
kubecontainer "k8s.io/kubernetes/pkg/kubelet/container"
|
||||||
"k8s.io/kubernetes/pkg/kubelet/dockertools"
|
|
||||||
"k8s.io/kubernetes/pkg/util/term"
|
"k8s.io/kubernetes/pkg/util/term"
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -34,14 +32,6 @@ func (ds *dockerService) LegacyAttach(id kubecontainer.ContainerID, stdin io.Rea
|
|||||||
return ds.streamingRuntime.Attach(id.ID, stdin, stdout, stderr, resize)
|
return ds.streamingRuntime.Attach(id.ID, stdin, stdout, stderr, resize)
|
||||||
}
|
}
|
||||||
|
|
||||||
func (ds *dockerService) GetContainerLogs(pod *api.Pod, containerID kubecontainer.ContainerID, logOptions *api.PodLogOptions, stdout, stderr io.Writer) (err error) {
|
|
||||||
container, err := ds.client.InspectContainer(containerID.ID)
|
|
||||||
if err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
return dockertools.GetContainerLogs(ds.client, pod, containerID, logOptions, stdout, stderr, container.Config.Tty)
|
|
||||||
}
|
|
||||||
|
|
||||||
func (ds *dockerService) LegacyPortForward(sandboxID string, port uint16, stream io.ReadWriteCloser) error {
|
func (ds *dockerService) LegacyPortForward(sandboxID string, port uint16, stream io.ReadWriteCloser) error {
|
||||||
return ds.streamingRuntime.PortForward(sandboxID, int32(port), stream)
|
return ds.streamingRuntime.PortForward(sandboxID, int32(port), stream)
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user