Bump k8s.io/uitls to 8e7ff06

The reason for the bump is the new functionality of the
k8s.io/utils/exec package which allows
- to get a hold of the process' std{out,err} as `io.Reader`s
- to `Start` a process and `Wait` for it

This should help on addressing #70890 by allowing to wrap std{out,err}
of the process to be wrapped with a `io.limitedReader`.

It also updates
- k8s.io/kubernetes/pkg/probe/exec.FakeCmd
- k8s.io/kubernetes/pkg/kubelet/prober.execInContainer
- k8s.io/kubernetes/cmd/kubeadm/app/phases/kubelet.fakeCmd
to implement the changed interface.

The dependency on 'k8s.io/utils/pointer' to the new version has also
been bumped in some staging repos:
- apiserver
- kube-controller-manager
- kube-scheduler
This commit is contained in:
Hannes Hörl
2018-11-14 23:10:07 +00:00
parent 0df79e4daa
commit 0d4b5c98f8
12 changed files with 176 additions and 19 deletions

View File

@@ -34,14 +34,19 @@ type fakeCmd struct {
err error
}
func (f fakeCmd) Run() error { return f.err }
func (f fakeCmd) CombinedOutput() ([]byte, error) { return f.b, f.err }
func (f fakeCmd) Output() ([]byte, error) { return f.b, f.err }
func (f fakeCmd) SetDir(dir string) {}
func (f fakeCmd) SetStdin(in io.Reader) {}
func (f fakeCmd) SetStdout(out io.Writer) {}
func (f fakeCmd) SetStderr(out io.Writer) {}
func (f fakeCmd) Stop() {}
func (f fakeCmd) Run() error { return f.err }
func (f fakeCmd) CombinedOutput() ([]byte, error) { return f.b, f.err }
func (f fakeCmd) Output() ([]byte, error) { return f.b, f.err }
func (f fakeCmd) SetDir(dir string) {}
func (f fakeCmd) SetStdin(in io.Reader) {}
func (f fakeCmd) SetStdout(out io.Writer) {}
func (f fakeCmd) SetStderr(out io.Writer) {}
func (f fakeCmd) SetEnv([]string) {}
func (f fakeCmd) Stop() {}
func (f fakeCmd) Start() error { return nil }
func (f fakeCmd) Wait() error { return nil }
func (f fakeCmd) StdoutPipe() (io.ReadCloser, error) { return nil, nil }
func (f fakeCmd) StderrPipe() (io.ReadCloser, error) { return nil, nil }
type fakeExecer struct {
ioMap map[string]fakeCmd