Help us shape the future of Go! Take the 2026 Go Developer Survey

labels

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: Apr 5, 2023 License: Apache-2.0 Imports: 0 Imported by: 0

Documentation

Overview

Package labels defines labels that are set to containerd containers as labels. The labels are also passed to OCI containers as annotations.

Index

Constants

View Source
const (
	// Prefix is the common prefix of nerdctl labels
	Prefix = "nerdctl/"

	// Namespace is the containerd namespace such as "default", "k8s.io"
	Namespace = Prefix + "namespace"

	// Name is a human-friendly name.
	// WARNING: multiple containers may have same the name label
	Name = Prefix + "name"

	//Compose Project Name
	ComposeProject = "com.docker.compose.project"

	//Compose Service Name
	ComposeService = "com.docker.compose.service"

	//Compose Network Name
	ComposeNetwork = "com.docker.compose.network"

	//Compose Volume Name
	ComposeVolume = "com.docker.compose.volume"

	// Hostname
	Hostname = Prefix + "hostname"

	// ExtraHosts are HostIPs to appended to /etc/hosts
	ExtraHosts = Prefix + "extraHosts"

	// StateDir is "/var/lib/nerdctl/<ADDRHASH>/containers/<NAMESPACE>/<ID>"
	StateDir = Prefix + "state-dir"

	// Networks is a JSON-marshalled string of []string, e.g. []string{"bridge"}.
	// Currently, the length of the slice must be 1.
	Networks = Prefix + "networks"

	// Ports is a JSON-marshalled string of []gocni.PortMapping .
	Ports = Prefix + "ports"

	// IPAddress is the static IP address of the container assigned by the user
	IPAddress = Prefix + "ip"

	// LogURI is the log URI
	LogURI = Prefix + "log-uri"

	// PIDFile is the `nerdctl run --pidfile`
	// (CLI flag is "pidfile", not "pid-file", for Podman compatibility)
	PIDFile = Prefix + "pid-file"

	// AnonymousVolumes is a JSON-marshalled string of []string
	AnonymousVolumes = Prefix + "anonymous-volumes"

	// Platform is the normalized platform string like "linux/ppc64le".
	Platform = Prefix + "platform"

	// Mounts is the mount points for the container.
	Mounts = Prefix + "mounts"

	// Bypass4netns is the flag for acceleration with bypass4netns
	// Boolean value which can be parsed with strconv.ParseBool() is required.
	// (like "nerdctl/bypass4netns=true" or "nerdctl/bypass4netns=false")
	Bypass4netns = Prefix + "bypass4netns"

	// StopTimeout is seconds to wait for stop a container.
	StopTimout = Prefix + "stop-timeout"

	MACAddress = Prefix + "mac-address"

	// PIDContainer is the `nerdctl run --pid` for restarting
	PIDContainer = Prefix + "pid-container"

	// Error encapsulates a container human-readable string
	// that describes container error.
	Error = Prefix + "error"

	// NerdctlDefaultNetwork indicates whether a network is the default network
	// created and owned by Nerdctl.
	// Boolean value which can be parsed with strconv.ParseBool() is required.
	// (like "nerdctl/default-network=true" or "nerdctl/default-network=false")
	NerdctlDefaultNetwork = Prefix + "default-network"
)

Variables

View Source
var ShellCompletions = []string{
	Bypass4netns + "=true",
	Bypass4netns + "=false",
}

Functions

This section is empty.

Types

This section is empty.

Directories

Path Synopsis
Package k8slabels defines Kubernetes container labels
Package k8slabels defines Kubernetes container labels

Jump to

Keyboard shortcuts

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