summaryrefslogtreecommitdiff
path: root/vendor/k8s.io/kubernetes/pkg/kubelet/container/runtime.go
diff options
context:
space:
mode:
authorDaniel J Walsh <dwalsh@redhat.com>2018-03-26 18:26:55 -0400
committerAtomic Bot <atomic-devel@projectatomic.io>2018-03-27 18:09:12 +0000
commitaf64e10400f8533a0c48ecdf5ab9b7fbf329e14e (patch)
tree59160e3841b440dd35189c724bbb4375a7be173b /vendor/k8s.io/kubernetes/pkg/kubelet/container/runtime.go
parent26d7e3c7b85e28c4e42998c90fdcc14079f13eef (diff)
downloadpodman-af64e10400f8533a0c48ecdf5ab9b7fbf329e14e.tar.gz
podman-af64e10400f8533a0c48ecdf5ab9b7fbf329e14e.tar.bz2
podman-af64e10400f8533a0c48ecdf5ab9b7fbf329e14e.zip
Vendor in lots of kubernetes stuff to shrink image size
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com> Closes: #554 Approved by: mheon
Diffstat (limited to 'vendor/k8s.io/kubernetes/pkg/kubelet/container/runtime.go')
-rw-r--r--vendor/k8s.io/kubernetes/pkg/kubelet/container/runtime.go36
1 files changed, 27 insertions, 9 deletions
diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/container/runtime.go b/vendor/k8s.io/kubernetes/pkg/kubelet/container/runtime.go
index c3403ad57..56aeaf813 100644
--- a/vendor/k8s.io/kubernetes/pkg/kubelet/container/runtime.go
+++ b/vendor/k8s.io/kubernetes/pkg/kubelet/container/runtime.go
@@ -25,11 +25,11 @@ import (
"time"
"github.com/golang/glog"
+ "k8s.io/api/core/v1"
"k8s.io/apimachinery/pkg/types"
"k8s.io/client-go/tools/remotecommand"
"k8s.io/client-go/util/flowcontrol"
- "k8s.io/kubernetes/pkg/api/v1"
- runtimeapi "k8s.io/kubernetes/pkg/kubelet/apis/cri/v1alpha1/runtime"
+ runtimeapi "k8s.io/kubernetes/pkg/kubelet/apis/cri/runtime/v1alpha2"
"k8s.io/kubernetes/pkg/volume"
)
@@ -127,9 +127,8 @@ type Runtime interface {
// DirectStreamingRuntime is the interface implemented by runtimes for which the streaming calls
// (exec/attach/port-forward) should be served directly by the Kubelet.
type DirectStreamingRuntime interface {
- // Runs the command in the container of the specified pod using nsenter.
- // Attaches the processes stdin, stdout, and stderr. Optionally uses a
- // tty.
+ // Runs the command in the container of the specified pod. Attaches
+ // the processes stdin, stdout, and stderr. Optionally uses a tty.
ExecInContainer(containerID ContainerID, cmd []string, stdin io.Reader, stdout, stderr io.WriteCloser, tty bool, resize <-chan remotecommand.TerminalSize, timeout time.Duration) error
// Forward the specified port from the specified pod to the stream.
PortForward(pod *Pod, port int32, stream io.ReadWriteCloser) error
@@ -266,6 +265,13 @@ const (
ContainerStateUnknown ContainerState = "unknown"
)
+type ContainerType string
+
+const (
+ ContainerTypeInit ContainerType = "INIT"
+ ContainerTypeRegular ContainerType = "REGULAR"
+)
+
// Container provides the runtime information for a container, such as ID, hash,
// state of the container.
type Container struct {
@@ -376,6 +382,11 @@ type EnvVar struct {
Value string
}
+type Annotation struct {
+ Name string
+ Value string
+}
+
type Mount struct {
// Name of the volume mount.
// TODO(yifan): Remove this field, as this is not representing the unique name of the mount,
@@ -389,6 +400,8 @@ type Mount struct {
ReadOnly bool
// Whether the mount needs SELinux relabeling
SELinuxRelabel bool
+ // Requested propagation mode
+ Propagation runtimeapi.MountPropagation
}
type PortMapping struct {
@@ -423,14 +436,14 @@ type RunContainerOptions struct {
Devices []DeviceInfo
// The port mappings for the containers.
PortMappings []PortMapping
+ // The annotations for the container
+ // These annotations are generated by other components (i.e.,
+ // not users). Currently, only device plugins populate the annotations.
+ Annotations []Annotation
// If the container has specified the TerminationMessagePath, then
// this directory will be used to create and mount the log file to
// container.TerminationMessagePath
PodContainerDir string
- // The list of DNS servers for the container to use.
- DNS []string
- // The list of DNS search domains.
- DNSSearch []string
// The parent cgroup to pass to Docker
CgroupParent string
// The type of container rootfs
@@ -449,9 +462,14 @@ type RunContainerOptions struct {
type VolumeInfo struct {
// Mounter is the volume's mounter
Mounter volume.Mounter
+ // BlockVolumeMapper is the Block volume's mapper
+ BlockVolumeMapper volume.BlockVolumeMapper
// SELinuxLabeled indicates whether this volume has had the
// pod's SELinux label applied to it or not
SELinuxLabeled bool
+ // Whether the volume permission is set to read-only or not
+ // This value is passed from volume.spec
+ ReadOnly bool
}
type VolumeMap map[string]VolumeInfo