Documentation ¶
Index ¶
- Constants
- Variables
- func ToCRIMetaJSON(c *localtypes.Container) (*localtypes.SandboxMeta, error)
- func ToPouchContainerMeta(meta *dockertypes.ContainerJSON) (*localtypes.Container, error)
- func ToVolume(vol *dockertypes.Volume) (*volumetypes.Volume, error)
- func ToVolumes(volumes []*dockertypes.Volume) ([]*volumetypes.Volume, error)
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.
Click to show internal directories.
Click to hide internal directories.