Documentation ¶
Index ¶
- Variables
- func AddApp(cfg RunConfig, dir string, img *types.Hash) error
- func CheckMdsAvailability() error
- func Enter(cdir string, podPID int, appName types.ACName, stage1Path string, ...) error
- func GC(pdir string, uuid *types.UUID) error
- func GetMountsForPrefix(path string) (mounts, error)
- func InitDebug()
- func MergeMounts(mounts []schema.Mount, appMounts []schema.Mount) []schema.Mount
- func MountGC(path, uuid string) error
- func Prepare(cfg PrepareConfig, dir string, uuid *types.UUID) error
- func RmApp(dir string, uuid *types.UUID, usesOverlay bool, appName *types.ACName, ...) error
- func Run(cfg RunConfig, dir string, dataDir string)
- func StartApp(cfg StartConfig) error
- func StopApp(cfg StopConfig) error
- func StopPod(dir string, force bool, uuid *types.UUID) error
- type CommonConfig
- type DNSConfMode
- type HostsEntries
- type PrepareConfig
- type RunConfig
- type StartConfig
- type StopConfig
Constants ¶
This section is empty.
Variables ¶
var ValidOSArch = map[string][]string{
"linux": {"amd64", "i386", "aarch64", "aarch64_be", "armv6l", "armv7l", "armv7b"},
}
ValidOSArch contains the supported ACI image OS/architecture combinations.
Functions ¶
func AddApp ¶ added in v1.16.0
TODO(iaguis): add override options for Exec, Environment (à la patch-manifest)
func CheckMdsAvailability ¶ added in v0.9.0
func CheckMdsAvailability() error
CheckMdsAvailability checks whether a local metadata service can be reached.
func Enter ¶ added in v0.2.0
func Enter(cdir string, podPID int, appName types.ACName, stage1Path string, cmdline []string) error
Enter enters the pod/app by exec()ing the stage1's /enter similar to /init /enter can expect to have its CWD set to the app root. appName and command are supplied to /enter on argv followed by any arguments. stage1Path is the path of the stage1 rootfs
func GC ¶ added in v0.5.4
GC enters the pod by fork/exec()ing the stage1's /gc similar to /init. /gc can expect to have its CWD set to the pod root.
func GetMountsForPrefix ¶ added in v1.15.0
func MergeMounts ¶ added in v0.10.0
MergeMounts combines the global and per-app mount slices
func Prepare ¶ added in v0.4.0
func Prepare(cfg PrepareConfig, dir string, uuid *types.UUID) error
Prepare sets up a pod based on the given config.
func Run ¶
Run mounts the right overlay filesystems and actually runs the prepared pod by exec()ing the stage1 init inside the pod filesystem.
func StartApp ¶ added in v1.16.0
func StartApp(cfg StartConfig) error
func StopApp ¶ added in v1.16.0
func StopApp(cfg StopConfig) error
Types ¶
type CommonConfig ¶ added in v0.4.0
type CommonConfig struct { Store *imagestore.Store // store containing all of the configured application images TreeStore *treestore.Store // store containing all of the configured application images Stage1Image types.Hash // stage1 image containing usable /init and /enter entrypoints UUID *types.UUID // UUID of the pod RootHash string // Hash of the root filesystem ManifestData string // The pod manifest data Debug bool MountLabel string // selinux label to use for fs ProcessLabel string // selinux label to use Mutable bool // whether this pod is mutable }
CommonConfig defines the configuration shared by both Run and Prepare
type DNSConfMode ¶ added in v1.15.0
DNSConfMode indicates what the stage1 should do with dns config files The values and meanings are: 'host': bind-mount from host 'stage0': the stage0 has generated it 'none' : do not generate it 'default' : do whatever was the default
type HostsEntries ¶ added in v1.15.0
HostsEntries encapsulates the entries in an etc-hosts file: mapping from IP to arbitrary list of hostnames
type PrepareConfig ¶ added in v0.4.0
type PrepareConfig struct { *CommonConfig Apps *apps.Apps // apps to prepare InheritEnv bool // inherit parent environment into apps ExplicitEnv []string // always set these environment variables for all the apps EnvFromFile []string // environment variables loaded from files, set for all the apps Ports []types.ExposedPort // list of ports that rkt will expose on the host UseOverlay bool // prepare pod with overlay fs SkipTreeStoreCheck bool // skip checking the treestore before rendering PodManifest string // use the pod manifest specified by the user, this will ignore flags such as '--volume', '--port', etc. PrivateUsers *user.UidRange // User namespaces }
PrepareConfig defines the configuration parameters required by Prepare
type RunConfig ¶ added in v0.4.0
type RunConfig struct { *CommonConfig Net common.NetList // pod should have its own network stack LockFd int // lock file descriptor Interactive bool // whether the pod is interactive or not MDSRegister bool // whether to register with metadata service or not Apps schema.AppList // applications (prepare gets them via Apps) LocalConfig string // Path to local configuration Hostname string // hostname of the pod RktGid int // group id of the 'rkt' group, -1 ere's no rkt group. DNSConfMode DNSConfMode // dns configuration file mode - for stAage1 DNSConfig cnitypes.DNS // the DNS configuration (nameservers, search, options) InsecureCapabilities bool // Do not restrict capabilities InsecurePaths bool // Do not restrict access to files in sysfs or procfs InsecureSeccomp bool // Do not add seccomp restrictions UseOverlay bool // run pod with overlay fs HostsEntries HostsEntries // The entries in /etc/hosts }
RunConfig defines the configuration parameters needed by Run
type StartConfig ¶ added in v1.16.0
type StopConfig ¶ added in v1.16.0
type StopConfig struct { *CommonConfig Dir string AppName *types.ACName PodPID int }