Documentation ¶
Index ¶
- Constants
- func GetNetworkNS(spec *specs.Spec) (string, error)
- func GetPIDNS(spec *specs.Spec) (string, error)
- func GetSpec(bundlePath string) (*specs.Spec, error)
- func ListeningPorts(pid int) ([]uint16, error)
- type Config
- type Container
- func (c *Container) CancelScaleDown()
- func (c *Container) ID() string
- func (c *Container) InitialProcess() process.Process
- func (c *Container) Process() process.Process
- func (c *Container) RegisterSetContainer(f func(*runc.Container))
- func (c *Container) Restore(ctx context.Context) (*runc.Container, process.Process, error)
- func (c *Container) ScaledDown() bool
- func (c *Container) ScheduleScaleDown() error
- func (c *Container) SetScaledDown(scaledDown bool)
- func (c *Container) Stop(ctx context.Context)
- func (c *Container) StopActivator(ctx context.Context)
Constants ¶
View Source
const ( NodeLabel = "zeropod.ctrox.dev/node" PortsAnnotationKey = "zeropod.ctrox.dev/ports-map" ContainerNamesAnnotationKey = "zeropod.ctrox.dev/container-names" ScaleDownDurationAnnotationKey = "zeropod.ctrox.dev/scaledown-duration" DisableCheckpoiningAnnotationKey = "zeropod.ctrox.dev/disable-checkpointing" PreDumpAnnotationKey = "zeropod.ctrox.dev/pre-dump" CRIContainerNameAnnotation = "io.kubernetes.cri.container-name" CRIContainerTypeAnnotation = "io.kubernetes.cri.container-type" )
View Source
const ( LabelPodName = "pod" LabelPodNamespace = "namespace" MetricsNamespace = "zeropod" MetricCheckPointDuration = "checkpoint_duration_seconds" MetricRestoreDuration = "restore_duration_seconds" MetricLastCheckpointTime = "last_checkpoint_time" MetricLastRestoreTime = "last_restore_time" MetricRunning = "running" )
View Source
const MetricsSocketPath = "/run/zeropod/s/"
View Source
const RuntimeName = "io.containerd.zeropod.v2"
Variables ¶
This section is empty.
Functions ¶
func GetNetworkNS ¶
GetNetworkNS reads the bundle's OCI spec and returns the network NS path of the container.
func GetPIDNS ¶ added in v0.0.2
GetPIDNS reads the bundle's OCI spec and returns the PID NS path of the container.
func ListeningPorts ¶ added in v0.0.2
ListeningPorts finds all ports of the pid that are in listen state of the supplied process. It finds both, ipv4 and ipv6 sockets.
Types ¶
type Config ¶
type Config struct { ZeropodContainerNames []string Ports []uint16 ScaleDownDuration time.Duration DisableCheckpointing bool PreDump bool ContainerName string ContainerType string PodName string PodNamespace string // contains filtered or unexported fields }
func NewConfig ¶
NewConfig uses the annotations from the container spec to create a new typed ZeropodConfig config.
func (Config) IsZeropodContainer ¶ added in v0.0.2
type Container ¶
func (*Container) CancelScaleDown ¶
func (c *Container) CancelScaleDown()
func (*Container) InitialProcess ¶
func (*Container) RegisterSetContainer ¶ added in v0.0.2
func (*Container) ScaledDown ¶
func (*Container) ScheduleScaleDown ¶
func (*Container) SetScaledDown ¶
func (*Container) StopActivator ¶
Click to show internal directories.
Click to hide internal directories.