Documentation ¶
Index ¶
- Constants
- func ConvertContainer(container *parser.UnitFile, names map[string]string, isUser bool) (*parser.UnitFile, error)
- func ConvertKube(kube *parser.UnitFile, names map[string]string, isUser bool) (*parser.UnitFile, error)
- func ConvertNetwork(network *parser.UnitFile, name string) (*parser.UnitFile, string, error)
- func ConvertVolume(volume *parser.UnitFile, name string) (*parser.UnitFile, string, error)
- type PodmanCmdline
Constants ¶
const ( // Directory for global Quadlet files (sysadmin owned) UnitDirAdmin = "/etc/containers/systemd" // Directory for global Quadlet files (distro owned) UnitDirDistro = "/usr/share/containers/systemd" // Names of commonly used systemd/quadlet group names ContainerGroup = "Container" InstallGroup = "Install" KubeGroup = "Kube" NetworkGroup = "Network" ServiceGroup = "Service" UnitGroup = "Unit" VolumeGroup = "Volume" XContainerGroup = "X-Container" XKubeGroup = "X-Kube" XNetworkGroup = "X-Network" XVolumeGroup = "X-Volume" )
const ( KeyAddCapability = "AddCapability" KeyAddDevice = "AddDevice" KeyAnnotation = "Annotation" KeyAutoUpdate = "AutoUpdate" KeyConfigMap = "ConfigMap" KeyContainerName = "ContainerName" KeyCopy = "Copy" KeyDevice = "Device" KeyDNS = "DNS" KeyDNSOption = "DNSOption" KeyDNSSearch = "DNSSearch" KeyDropCapability = "DropCapability" KeyEnvironment = "Environment" KeyEnvironmentFile = "EnvironmentFile" KeyEnvironmentHost = "EnvironmentHost" KeyExec = "Exec" KeyExitCodePropagation = "ExitCodePropagation" KeyExposeHostPort = "ExposeHostPort" KeyGroup = "Group" KeyHealthCmd = "HealthCmd" KeyHealthInterval = "HealthInterval" KeyHealthOnFailure = "HealthOnFailure" KeyHealthRetries = "HealthRetries" KeyHealthStartPeriod = "HealthStartPeriod" KeyHealthStartupCmd = "HealthStartupCmd" KeyHealthStartupInterval = "HealthStartupInterval" KeyHealthStartupRetries = "HealthStartupRetries" KeyHealthStartupSuccess = "HealthStartupSuccess" KeyHealthStartupTimeout = "HealthStartupTimeout" KeyHealthTimeout = "HealthTimeout" KeyHostName = "HostName" KeyIP = "IP" KeyIP6 = "IP6" KeyImage = "Image" KeyLabel = "Label" KeyLogDriver = "LogDriver" KeyMask = "Mask" KeyMount = "Mount" KeyNetwork = "Network" KeyNetworkDisableDNS = "DisableDNS" KeyNetworkDriver = "Driver" KeyNetworkGateway = "Gateway" KeyNetworkIPAMDriver = "IPAMDriver" KeyNetworkIPRange = "IPRange" KeyNetworkIPv6 = "IPv6" KeyNetworkInternal = "Internal" KeyNetworkName = "NetworkName" KeyNetworkOptions = "Options" KeyNetworkSubnet = "Subnet" KeyNoNewPrivileges = "NoNewPrivileges" KeyNotify = "Notify" KeyOptions = "Options" KeyPidsLimit = "PidsLimit" KeyPodmanArgs = "PodmanArgs" KeyPublishPort = "PublishPort" KeyPull = "Pull" KeyReadOnly = "ReadOnly" KeyRemapGID = "RemapGid" KeyRemapUID = "RemapUid" KeyRemapUIDSize = "RemapUidSize" KeyRemapUsers = "RemapUsers" KeyRootfs = "Rootfs" KeyRunInit = "RunInit" KeySeccompProfile = "SeccompProfile" KeySecret = "Secret" KeySecurityLabelDisable = "SecurityLabelDisable" KeySecurityLabelFileType = "SecurityLabelFileType" KeySecurityLabelLevel = "SecurityLabelLevel" KeySecurityLabelNested = "SecurityLabelNested" KeySecurityLabelType = "SecurityLabelType" KeySetWorkingDirectory = "SetWorkingDirectory" KeyShmSize = "ShmSize" KeySysctl = "Sysctl" KeyTimezone = "Timezone" KeyTmpfs = "Tmpfs" KeyType = "Type" KeyUlimit = "Ulimit" KeyUnmask = "Unmask" KeyUser = "User" KeyUserNS = "UserNS" KeyVolatileTmp = "VolatileTmp" KeyVolume = "Volume" KeyVolumeName = "VolumeName" KeyWorkingDir = "WorkingDir" KeyYaml = "Yaml" )
All the supported quadlet keys
const (
ServiceKeyWorkingDirectory = "WorkingDirectory"
)
Systemd Unit file keys
Variables ¶
This section is empty.
Functions ¶
func ConvertContainer ¶
func ConvertContainer(container *parser.UnitFile, names map[string]string, isUser bool) (*parser.UnitFile, error)
Convert a quadlet container file (unit file with a Container group) to a systemd service file (unit file with Service group) based on the options in the Container group. The original Container group is kept around as X-Container.
func ConvertKube ¶
func ConvertNetwork ¶
Convert a quadlet network file (unit file with a Network group) to a systemd service file (unit file with Service group) based on the options in the Network group. The original Network group is kept around as X-Network. Also returns the canonical network name, either auto-generated or user-defined via the NetworkName key-value.
func ConvertVolume ¶
Convert a quadlet volume file (unit file with a Volume group) to a systemd service file (unit file with Service group) based on the options in the Volume group. The original Volume group is kept around as X-Volume. Also returns the canonical volume name, either auto-generated or user-defined via the VolumeName key-value.
Types ¶
type PodmanCmdline ¶
type PodmanCmdline struct {
Args []string
}
This is a helper for constructing podman commandlines
func NewPodmanCmdline ¶
func NewPodmanCmdline(args ...string) *PodmanCmdline