convertor

package
v0.0.0-...-6d8d8d4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 7, 2019 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// PouchContainerTypeLabelKey label to identify whether a container is a sandbox
	// or container
	PouchContainerTypeLabelKey = "io.kubernetes.pouch.type"
	// PouchContainerTypeLabelSandbox specify this container is a sandbox
	PouchContainerTypeLabelSandbox = "sandbox"
	// PouchContainerTypeLabelContainer specify this container is a container
	PouchContainerTypeLabelContainer = "container"

	// DockerContainerTypeLabelKey label to identify whether a container is a sandbox
	// or container
	DockerContainerTypeLabelKey = "io.kubernetes.docker.type"

	// SandboxIDLabelKey specify sandbox container id
	SandboxIDLabelKey = "io.kubernetes.sandbox.id"
)

Variables

View Source
var (
	// SandboxNameRegex is the regex of Sandbox name
	SandboxNameRegex = regexp.MustCompile("^k8s_POD_([^_]+_){3}[0-9]+$")
)
View Source
var (
	// SupportVolumeDrivers specify volume drivers d2p supported
	SupportVolumeDrivers = []string{"ultron", "local", "alilocal"}
)

Functions

func ToCRIMetaJSON

func ToCRIMetaJSON(c *localtypes.Container) (*localtypes.SandboxMeta, error)

ToCRIMetaJSON generate cri sandbox meta json from sandbox container

func ToPouchContainerMeta

func ToPouchContainerMeta(meta *dockertypes.ContainerJSON) (*localtypes.Container, error)

ToPouchContainerMeta coverts docker container config to pouch container config.

func ToVolume

func ToVolume(vol *dockertypes.Volume) (*volumetypes.Volume, error)

ToVolume converts docker volume information to pouch volume

func ToVolumes

func ToVolumes(volumes []*dockertypes.Volume) ([]*volumetypes.Volume, error)

ToVolumes convert docker volume slice to pouch volume slice.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL