Documentation ¶
Overview ¶
Package rktshim is the package that contains the shim code for rkt to be used as the kubelet container runtime implementation that is integrated using the Container Runtime Interface.
Index ¶
- Variables
- func NewFakeRuntime() (kubeletApi.ContainerManager, error)
- func NewPodSandboxManager(PodSandboxManagerConfig) (kubeletApi.PodSandboxManager, error)
- func NewRuntime(RuntimeConfig) (kubeletApi.ContainerManager, error)
- type FakeRuntime
- func (r *FakeRuntime) ContainerStatus(id string) (*runtimeApi.ContainerStatus, error)
- func (r *FakeRuntime) CreateContainer(pid string, cfg *runtimeApi.ContainerConfig, ...) (string, error)
- func (r *FakeRuntime) Exec(id string, cmd []string, tty bool, in io.Reader, out, err io.WriteCloser) error
- func (r *FakeRuntime) ListContainers(*runtimeApi.ContainerFilter) ([]*runtimeApi.Container, error)
- func (r *FakeRuntime) RemoveContainer(id string) error
- func (r *FakeRuntime) StartContainer(id string) error
- func (r *FakeRuntime) StopContainer(id string, timeout int64) error
- type FakeRuntimeConfig
- type ImageStore
- type ImageStoreConfig
- type PodSandboxManager
- func (*PodSandboxManager) ListPodSandbox(*runtimeApi.PodSandboxFilter) ([]*runtimeApi.PodSandbox, error)
- func (*PodSandboxManager) PodSandboxStatus(string) (*runtimeApi.PodSandboxStatus, error)
- func (*PodSandboxManager) RemovePodSandbox(string) error
- func (*PodSandboxManager) RunPodSandbox(*runtimeApi.PodSandboxConfig) (string, error)
- func (*PodSandboxManager) StopPodSandbox(string) error
- type PodSandboxManagerConfig
- type Runtime
- func (*Runtime) ContainerStatus(string) (*runtimeApi.ContainerStatus, error)
- func (*Runtime) CreateContainer(string, *runtimeApi.ContainerConfig, *runtimeApi.PodSandboxConfig) (string, error)
- func (*Runtime) Exec(string, []string, bool, io.Reader, io.WriteCloser, io.WriteCloser) error
- func (*Runtime) ListContainers(*runtimeApi.ContainerFilter) ([]*runtimeApi.Container, error)
- func (*Runtime) RemoveContainer(string) error
- func (*Runtime) StartContainer(string) error
- func (*Runtime) StopContainer(string, int64) error
- type RuntimeConfig
Constants ¶
This section is empty.
Variables ¶
var ( ErrContainerNotFound = errors.New("rktshim: container not found") ErrInvalidContainerStateTransition = errors.New("rktshim: wrong container operation for current state") )
var (
ErrImageNotFound = errors.New("rktshim: image not found")
)
TODO(tmrts): Move these errors to the container API for code re-use.
Functions ¶
func NewFakeRuntime ¶
func NewFakeRuntime() (kubeletApi.ContainerManager, error)
func NewPodSandboxManager ¶
func NewPodSandboxManager(PodSandboxManagerConfig) (kubeletApi.PodSandboxManager, error)
NewPodSandboxManager creates a PodSandboxManager.
func NewRuntime ¶
func NewRuntime(RuntimeConfig) (kubeletApi.ContainerManager, error)
NewRuntime creates a container.Runtime instance using the Runtime.
Types ¶
type FakeRuntime ¶
type FakeRuntime struct {
Containers containerRegistry
}
func (*FakeRuntime) ContainerStatus ¶
func (r *FakeRuntime) ContainerStatus(id string) (*runtimeApi.ContainerStatus, error)
func (*FakeRuntime) CreateContainer ¶
func (r *FakeRuntime) CreateContainer(pid string, cfg *runtimeApi.ContainerConfig, sandboxCfg *runtimeApi.PodSandboxConfig) (string, error)
func (*FakeRuntime) Exec ¶
func (r *FakeRuntime) Exec(id string, cmd []string, tty bool, in io.Reader, out, err io.WriteCloser) error
func (*FakeRuntime) ListContainers ¶
func (r *FakeRuntime) ListContainers(*runtimeApi.ContainerFilter) ([]*runtimeApi.Container, error)
func (*FakeRuntime) RemoveContainer ¶
func (r *FakeRuntime) RemoveContainer(id string) error
func (*FakeRuntime) StartContainer ¶
func (r *FakeRuntime) StartContainer(id string) error
func (*FakeRuntime) StopContainer ¶
func (r *FakeRuntime) StopContainer(id string, timeout int64) error
type FakeRuntimeConfig ¶
type FakeRuntimeConfig struct{}
type ImageStore ¶
type ImageStore struct{}
ImageStore supports CRUD operations for images.
func NewImageStore ¶
func NewImageStore(ImageStoreConfig) (*ImageStore, error)
NewImageStore creates an image storage that allows CRUD operations for images.
func (*ImageStore) List ¶
func (*ImageStore) List() ([]runtimeApi.Image, error)
List lists the images residing in the image store.
func (*ImageStore) Pull ¶
func (*ImageStore) Pull(runtimeApi.ImageSpec, runtimeApi.AuthConfig, *runtimeApi.PodSandboxConfig) error
Pull pulls an image into the image store and uses the given authentication method.
func (*ImageStore) Remove ¶
func (*ImageStore) Remove(runtimeApi.ImageSpec) error
Remove removes the image from the image store.
func (*ImageStore) Status ¶
func (*ImageStore) Status(runtimeApi.ImageSpec) (runtimeApi.Image, error)
Status returns the status of the image.
type ImageStoreConfig ¶
type ImageStoreConfig struct{}
TODO(tmrts): fill the image store configuration fields.
type PodSandboxManager ¶
type PodSandboxManager struct{}
PodSandboxManager provides basic operations to create/delete and examine the pod sandboxes in a blocking manner.
func (*PodSandboxManager) ListPodSandbox ¶
func (*PodSandboxManager) ListPodSandbox(*runtimeApi.PodSandboxFilter) ([]*runtimeApi.PodSandbox, error)
ListPodSandbox lists existing sandboxes, filtered by the PodSandboxFilter.
func (*PodSandboxManager) PodSandboxStatus ¶
func (*PodSandboxManager) PodSandboxStatus(string) (*runtimeApi.PodSandboxStatus, error)
PodSandboxStatus queries the status of the pod sandbox.
func (*PodSandboxManager) RemovePodSandbox ¶
func (*PodSandboxManager) RemovePodSandbox(string) error
RemovePodSandbox deletes the pod sandbox and the apps inside the sandbox.
func (*PodSandboxManager) RunPodSandbox ¶ added in v1.5.0
func (*PodSandboxManager) RunPodSandbox(*runtimeApi.PodSandboxConfig) (string, error)
RunPodSandbox creates and starts a pod sandbox given a pod sandbox configuration.
func (*PodSandboxManager) StopPodSandbox ¶
func (*PodSandboxManager) StopPodSandbox(string) error
StopPodSandbox stops a pod sandbox and the apps inside the sandbox.
type PodSandboxManagerConfig ¶
type PodSandboxManagerConfig struct{}
TODO(tmrts): Fill the configuration struct fields.
type Runtime ¶
type Runtime struct{}
Runtime provides an API for lifecycle, inspection and introspection operations in a blocking manner using the App level API provided by rkt.
func (*Runtime) ContainerStatus ¶
func (*Runtime) ContainerStatus(string) (*runtimeApi.ContainerStatus, error)
ContainerStatus returns the RawContainerStatus of an app inside the pod sandbox.
func (*Runtime) CreateContainer ¶
func (*Runtime) CreateContainer(string, *runtimeApi.ContainerConfig, *runtimeApi.PodSandboxConfig) (string, error)
CreateContainer creates an app inside the provided pod sandbox and returns the RawContainerID.
func (*Runtime) ListContainers ¶
func (*Runtime) ListContainers(*runtimeApi.ContainerFilter) ([]*runtimeApi.Container, error)
ListContainers lists out the apps residing inside the pod sandbox using the ContainerFilter.
func (*Runtime) RemoveContainer ¶
RemoveContainer removes the app from a pod sandbox.
func (*Runtime) StartContainer ¶
StartContainer starts a created app.
type RuntimeConfig ¶
type RuntimeConfig struct{}
TODO(tmrts): Fill out the creation configuration fields.