runtimespec

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jan 5, 2024 License: BSD-2-Clause, Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

View Source
const (
	FreeBSDIPv4ModeNew     FreeBSDIPv4Mode = "new"
	FreeBSDIPv4ModeInherit                 = "inherit"
	FreeBSDIPv4ModeDisable                 = "disable"
)
View Source
const (
	// VersionMajor is for an API incompatible changes
	VersionMajor = 1
	// VersionMinor is for functionality in a backwards-compatible manner
	VersionMinor = 0
	// VersionPatch is for backwards-compatible bug fixes
	VersionPatch = 2

	// Modification by Samuel Karp
	// VersionDev indicates development branch. Releases will be empty string.
	VersionDev = "-runj-dev"
)

Variables

Version is the specification version that the package types support.

Functions

This section is empty.

Types

type FreeBSD

type FreeBSD struct {
	Network *FreeBSDNetwork `json:"network,omitempty"`
}

FreeBSD specifies FreeBSD-specific configuration options

type FreeBSDIPv4

type FreeBSDIPv4 struct {
	// Mode specifies the IPv4 mode of the jail.  Possible values are "new",
	// "inherit", and "disable".  Setting the Addr parameter implies a value of
	// "new".
	Mode FreeBSDIPv4Mode `json:"mode,omitempty"`
	// Addr is a list of IPv4 addresses assigned to the jail.  If this is set,
	// the jail is restricted to using only these addresses.
	Addr []string `json:"addr,omitempty"`
}

FreeBSDIPv4 encapsulates IPv4-specific jail options

type FreeBSDIPv4Mode

type FreeBSDIPv4Mode string

FreeBSDIPv4Mode describes the mode of IPv4 in the jail. Possible values are "new", "inherit", and "disable". Setting the IPv4 Addr parameter implies a value of "new".

type FreeBSDNetwork

type FreeBSDNetwork struct {
	IPv4 *FreeBSDIPv4 `json:"ipv4,omitempty"`
	VNet *FreeBSDVNet `json:"vnet,omitempty"`
}

FreeBSDNetwork specifies how the jail's network should be configured by the kernel

type FreeBSDVNet

type FreeBSDVNet struct {
	// Mode specifies the vnet mode of the jail.  Possible values are "new" and
	// "inherit".  Setting the Interfaces parameter implies a value of "new".
	Mode FreeBSDVNetMode `json:"mode,omitempty"`
	// Interfaces is a list of interfaces assigned to the jail.  If this is set,
	// the interfaces are moved into the jail and are inaccessible from the
	// host.
	Interfaces []string `json:"interfaces,omitempty"`
}

FreeBSDVNet encapsulates vnet-specific jail options

type FreeBSDVNetMode

type FreeBSDVNetMode string
const (
	FreeBSDVNetModeNew     FreeBSDVNetMode = "new"
	FreeBSDVNetModeInherit                 = "inherit"
)

type Hook

type Hook struct {
	Path    string   `json:"path"`
	Args    []string `json:"args,omitempty"`
	Env     []string `json:"env,omitempty"`
	Timeout *int     `json:"timeout,omitempty"`
}

Hook specifies a command that is run at a particular event in the lifecycle of a container

type Hooks

type Hooks struct {
	// Modification by Artem Khramov
	/*
	   // Prestart is Deprecated. Prestart is a list of hooks to be run before the container process is executed.
	   // It is called in the Runtime Namespace
	   Prestart []Hook `json:"prestart,omitempty"`
	*/
	// End of modification
	// CreateRuntime is a list of hooks to be run after the container has been created but before pivot_root or any equivalent operation has been called
	// It is called in the Runtime Namespace
	CreateRuntime []Hook `json:"createRuntime,omitempty"`
	// Modification by Artem Khramov
	/*
	   // CreateContainer is a list of hooks to be run after the container has been created but before pivot_root or any equivalent operation has been called
	   // It is called in the Container Namespace
	   CreateContainer []Hook `json:"createContainer,omitempty"`
	   // StartContainer is a list of hooks to be run after the start operation is called but before the container process is started
	   // It is called in the Container Namespace
	   StartContainer []Hook `json:"startContainer,omitempty"`
	   // Poststart is a list of hooks to be run after the container process is started.
	   // It is called in the Runtime Namespace
	   Poststart []Hook `json:"poststart,omitempty"`
	*/
	// End of modification
	// Poststop is a list of hooks to be run after the container process exits.
	// It is called in the Runtime Namespace
	Poststop []Hook `json:"poststop,omitempty"`
}

Hooks specifies a command that is run in the container at a particular event in the lifecycle of a container Hooks for container setup and teardown

type Mount

type Mount struct {
	// Destination is the absolute path where the mount will be placed in the container.
	Destination string `json:"destination"`
	// Type specifies the mount kind.
	Type string `json:"type,omitempty" platform:"linux,solaris"`
	// Source specifies the source path of the mount.
	Source string `json:"source,omitempty"`
	// Options are fstab style mount options.
	Options []string `json:"options,omitempty"`
}

Mount specifies a mount for a container.

type Process

type Process struct {
	// Terminal creates an interactive terminal for the container.
	Terminal bool `json:"terminal,omitempty"`

	// Args specifies the binary and arguments for the application to execute.
	Args []string `json:"args,omitempty"`

	// Env populates the process environment for the process.
	Env []string `json:"env,omitempty"`
}

Process contains information to start a specific application inside the container.

type Root

type Root struct {
	// Path is the absolute path to the container's root filesystem.
	Path string `json:"path"`
}

Root contains information about the container's root filesystem on the host.

type Spec

type Spec struct {
	// Version of the Open Container Initiative Runtime Specification with which the bundle complies.
	Version string `json:"ociVersion"`
	// Process configures the container process.
	Process *Process `json:"process,omitempty"`
	// Root configures the container's root filesystem.
	Root *Root `json:"root,omitempty"`

	// Hostname configures the container's hostname.
	Hostname string `json:"hostname,omitempty"`

	// Mounts configures additional mounts (on top of Root).
	Mounts []Mount `json:"mounts,omitempty"`

	// Hooks configures callbacks for container lifecycle events.
	Hooks *Hooks `json:"hooks,omitempty"`

	// Annotations contains arbitrary metadata for the container.
	Annotations map[string]string `json:"annotations,omitempty"`

	// Modification by Samuel Karp
	FreeBSD *FreeBSD `json:"freebsd,omitempty"`
}

Spec is the base configuration for the container.

Jump to

Keyboard shortcuts

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