mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-27 13:37:30 +00:00
Merge pull request #7208 from vmarmol/runtime
Add RunInContainer/ExecInContainer to container Runtime API.
This commit is contained in:
commit
961cd710d7
@ -18,6 +18,7 @@ package container
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
|
"io"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"github.com/GoogleCloudPlatform/kubernetes/pkg/api"
|
"github.com/GoogleCloudPlatform/kubernetes/pkg/api"
|
||||||
@ -58,6 +59,13 @@ type Runtime interface {
|
|||||||
// not managed by kubelet. If 'all' is false, then only running containers
|
// not managed by kubelet. If 'all' is false, then only running containers
|
||||||
// are returned.
|
// are returned.
|
||||||
GetContainers(all bool) ([]*Container, error)
|
GetContainers(all bool) ([]*Container, error)
|
||||||
|
// TODO(vmarmol): Merge RunInContainer and ExecInContainer.
|
||||||
|
// Runs the command in the container of the specified pod using nsinit.
|
||||||
|
RunInContainer(container api.Container, pod *api.Pod, cmd []string)
|
||||||
|
// Runs the command in the container of the specified pod using nsenter.
|
||||||
|
// Attaches the processes stdin, stdout, and stderr. Optionally uses a
|
||||||
|
// tty.
|
||||||
|
ExecInContainer(container api.Container, pod *api.Pod, stdin io.Reader, stdout, stderr io.WriteCloser, tty bool)
|
||||||
// TODO(yifan): Pull/Remove images
|
// TODO(yifan): Pull/Remove images
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user