Merge pull request #52686 from yujuhong/stream

Automatic merge from submit-queue (batch tested with PRs 52990, 53064, 52686, 52221, 53069). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

CRI: Allow configuring stdout/stderr streams for Exec/Attach requests

Add stdout/stderr to exec and attach requests. Also check the request to
ensure it meets the requirements.

**Which issue this PR fixes**: fixes #44448

```release-note
CRI: Add stdout/stderr fields to Exec and Attach requests.
```
This commit is contained in:
Kubernetes Submit Queue
2017-09-26 23:12:27 -07:00
committed by GitHub
5 changed files with 652 additions and 364 deletions

View File

@@ -767,6 +767,8 @@ func (m *kubeGenericRuntimeManager) GetExec(id kubecontainer.ContainerID, cmd []
Cmd: cmd,
Tty: tty,
Stdin: stdin,
Stdout: stdout,
Stderr: stderr,
}
resp, err := m.runtimeService.Exec(req)
if err != nil {
@@ -781,6 +783,8 @@ func (m *kubeGenericRuntimeManager) GetAttach(id kubecontainer.ContainerID, stdi
req := &runtimeapi.AttachRequest{
ContainerId: id.ID,
Stdin: stdin,
Stdout: stdout,
Stderr: stderr,
Tty: tty,
}
resp, err := m.runtimeService.Attach(req)