Documentation ¶
Index ¶
- Constants
- func EnvFilePathEnterexec(root string, appName types.ACName) string
- func EnvFilePathSystemd(root string, appName types.ACName) string
- func EvaluateSymlinksInsideApp(appRootfs, path string) (string, error)
- func GenerateMounts(ra *schema.RuntimeApp, volumes map[types.ACName]types.Volume, ...) []mountWrapper
- func GetAppHashes(p *stage1commontypes.Pod) []types.Hash
- func GetFlavor(p *stage1commontypes.Pod) (flavor string, systemdVersion int, err error)
- func GetMachineID(p *stage1commontypes.Pod) string
- func InitDebug(debug bool)
- func InstantiatedPrepareAppUnitName(appName types.ACName) string
- func IsMountReadOnly(vol types.Volume, mountPoints []types.MountPoint) bool
- func PodToNspawnArgs(p *stage1commontypes.Pod) ([]string, error)
- func PodToSystemd(p *stage1commontypes.Pod, interactive bool, flavor string, privateUsers string) error
- func PrepareMountpoints(volPath string, targetPath string, vol *types.Volume, dockerImplicit bool) error
- func RelEnvFilePathEnterexec(appName types.ACName) string
- func RelEnvFilePathSystemd(appName types.ACName) string
- func ServiceUnitName(appName types.ACName) string
- func ServiceUnitPath(root string, appName types.ACName) string
- func ServiceWantPath(root string, appName types.ACName) string
- func SetJournalPermissions(p *stage1commontypes.Pod) error
- func SocketUnitName(appName types.ACName) string
- func SocketUnitPath(root string, appName types.ACName) string
- func SocketWantPath(root string, appName types.ACName) string
- func WriteDefaultTarget(p *stage1commontypes.Pod) error
- func WritePrepareAppTemplate(p *stage1commontypes.Pod) error
Constants ¶
const ( // FlavorFile names the file storing the pod's flavor FlavorFile = "flavor" )
const (
// UnitsDir is the default path to systemd systemd unit directory
UnitsDir = "/usr/lib/systemd/system"
)
Variables ¶
This section is empty.
Functions ¶
func EnvFilePathEnterexec ¶ added in v1.5.0
EnvFilePathEnterexec returns the path to the environment file for the given app name to be parsed by enterexec.
func EnvFilePathSystemd ¶ added in v1.5.0
EnvFilePathSystemd returns the path to the environment file for the given app name to be parsed by systemd.
func EvaluateSymlinksInsideApp ¶ added in v1.5.1
EvaluateSymlinksInsideApp tries to resolve symlinks within the path. It returns the actual path relative to the app rootfs for the given path.
func GenerateMounts ¶
func GenerateMounts(ra *schema.RuntimeApp, volumes map[types.ACName]types.Volume, imageManifest *schema.ImageManifest) []mountWrapper
GenerateMounts maps MountPoint paths to volumes, returning a list of mounts, each with a parameter indicating if it's an implicit empty volume from a Docker image.
func GetAppHashes ¶ added in v0.14.0
func GetAppHashes(p *stage1commontypes.Pod) []types.Hash
GetAppHashes returns a list of hashes of the apps in this pod
func GetFlavor ¶ added in v0.14.0
func GetFlavor(p *stage1commontypes.Pod) (flavor string, systemdVersion int, err error)
GetFlavor populates a flavor string based on the flavor itself and respectively the systemd version If the systemd version couldn't be guessed, it will be set to 0.
func GetMachineID ¶ added in v0.14.0
func GetMachineID(p *stage1commontypes.Pod) string
GetMachineID returns the machine id string of the pod to be passed to systemd-nspawn
func InstantiatedPrepareAppUnitName ¶ added in v0.14.0
InstantiatedPrepareAppUnitName returns the systemd service unit name for prepare-app instantiated for the given root.
func IsMountReadOnly ¶
func IsMountReadOnly(vol types.Volume, mountPoints []types.MountPoint) bool
IsMountReadOnly returns if a mount should be readOnly. If the readOnly flag in the pod manifest is not nil, it overrides the readOnly flag in the image manifest.
func PodToNspawnArgs ¶ added in v0.14.0
func PodToNspawnArgs(p *stage1commontypes.Pod) ([]string, error)
PodToNspawnArgs renders a prepared Pod as a systemd-nspawn argument list ready to be executed
func PodToSystemd ¶ added in v0.14.0
func PodToSystemd(p *stage1commontypes.Pod, interactive bool, flavor string, privateUsers string) error
PodToSystemd creates the appropriate systemd service unit files for all the constituent apps of the Pod
func PrepareMountpoints ¶ added in v1.1.0
func PrepareMountpoints(volPath string, targetPath string, vol *types.Volume, dockerImplicit bool) error
PrepareMountpoints creates and sets permissions for empty volumes. If the mountpoint comes from a Docker image and it is an implicit empty volume, we copy files from the image to the volume, see https://docs.docker.com/engine/userguide/containers/dockervolumes/#data-volumes
func RelEnvFilePathEnterexec ¶ added in v1.5.0
RelEnvFilePathEnterexec returns the path to the environment file for the given app name relative to the pod's root to be parsed by enterexec.
func RelEnvFilePathSystemd ¶ added in v1.5.0
RelEnvFilePathSystemd returns the path to the environment file for the given app name relative to the pod's root to be parsed by systemd.
func ServiceUnitName ¶ added in v0.14.0
ServiceUnitName returns a systemd service unit name for the given app name.
func ServiceUnitPath ¶ added in v0.14.0
ServiceUnitPath returns the path to the systemd service file for the given app name.
func ServiceWantPath ¶ added in v0.14.0
ServiceWantPath returns the systemd default.target want symlink path for the given app name.
func SetJournalPermissions ¶ added in v0.15.0
func SetJournalPermissions(p *stage1commontypes.Pod) error
SetJournalPermissions sets ACLs and permissions so the rkt group can access the pod's logs
func SocketUnitName ¶ added in v0.14.0
SocketUnitName returns a systemd socket unit name for the given app name.
func SocketUnitPath ¶ added in v0.14.0
SocketUnitPath returns the path to the systemd socket file for the given app name.
func SocketWantPath ¶ added in v0.14.0
SocketWantPath returns the systemd sockets.target.wants symlink path for the given app name.
func WriteDefaultTarget ¶ added in v0.14.0
func WriteDefaultTarget(p *stage1commontypes.Pod) error
WriteDefaultTarget writes the default.target unit file which is responsible for bringing up the applications
func WritePrepareAppTemplate ¶ added in v0.14.0
func WritePrepareAppTemplate(p *stage1commontypes.Pod) error
WritePrepareAppTemplate writes service unit files for preparing the pod's applications
Types ¶
This section is empty.