Skip to content

Latest commit

 

History

History
65 lines (55 loc) · 10.1 KB

PodSpecGenerator.md

File metadata and controls

65 lines (55 loc) · 10.1 KB

PodSpecGenerator

PodSpecGenerator describes options to create a pod

Properties

Name Type Description Notes
networks Map<String, PerNetworkOptions> Map of networks names to ids the container should join to. You can request additional settings for each network, you can set network aliases, static ips, static mac address and the network interface name for this container on the specific network. If the map is empty and the bridge network mode is set the container will be joined to the default network. [optional]
cgroupParent String CgroupParent is the parent for the Cgroup that the pod will create. This pod cgroup will, in turn, be the default cgroup parent for all containers in the pod. Optional. [optional]
cniNetworks List<String> CNINetworks is a list of CNI networks to join the container to. If this list is empty, the default CNI network will be joined instead. If at least one entry is present, we will not join the default network (unless it is part of this list). Only available if NetNS is set to bridge. Optional. Deprecated: as of podman 4.0 use &quot;Networks&quot; instead. [optional]
cpuPeriod Integer CPU period of the cpuset, determined by --cpus [optional]
cpuQuota Long CPU quota of the cpuset, determined by --cpus [optional]
dnsOption List<String> DNSOption is a set of DNS options that will be used in the infra container's resolv.conf, which will, by default, be shared with all containers in the pod. Conflicts with NoInfra=true. Optional. [optional]
dnsSearch List<String> DNSSearch is a set of DNS search domains that will be used in the infra container's resolv.conf, which will, by default, be shared with all containers in the pod. If not provided, DNS search domains from the host's resolv.conf will be used. Conflicts with NoInfra=true. Optional. [optional]
dnsServer List<String> DNSServer is a set of DNS servers that will be used in the infra container's resolv.conf, which will, by default, be shared with all containers in the pod. If not provided, the host's DNS servers will be used, unless the only server set is a localhost address. As the container cannot connect to the host's localhost, a default server will instead be set. Conflicts with NoInfra=true. Optional. [optional]
exitPolicy String ExitPolicy determines the pod's exit and stop behaviour. [optional]
hostadd List<String> HostAdd is a set of hosts that will be added to the infra container's etc/hosts that will, by default, be shared with all containers in the pod. Conflicts with NoInfra=true and NoManageHosts. Optional. [optional]
hostname String Hostname is the pod's hostname. If not set, the name of the pod will be used (if a name was not provided here, the name auto-generated for the pod will be used). This will be used by the infra container and all containers in the pod as long as the UTS namespace is shared. Optional. [optional]
hostsFile String HostsFile is the base file to create the `/etc/hosts` file inside the infra container. This must either be an absolute path to a file on the host system, or one of the special flags `image` or `none`. If it is empty it defaults to the base_hosts_file configuration in containers.conf. Conflicts with NoInfra=true and NoManageHosts. Optional. [optional]
idmappings IDMappingOptions [optional]
imageVolumes List<ImageVolume> Image volumes bind-mount a container-image mount into the pod's infra container. Optional. [optional]
infraCommand List<String> InfraCommand sets the command that will be used to start the infra container. If not set, the default set in the Libpod configuration file will be used. Conflicts with NoInfra=true. Optional. [optional]
infraConmonPidFile String InfraConmonPidFile is a custom path to store the infra container's conmon PID. [optional]
infraImage String InfraImage is the image that will be used for the infra container. If not set, the default set in the Libpod configuration file will be used. Conflicts with NoInfra=true. Optional. [optional]
infraName String InfraName is the name that will be used for the infra container. If not set, the default set in the Libpod configuration file will be used. Conflicts with NoInfra=true. Optional. [optional]
ipcns Namespace [optional]
labels Map<String, String> Labels are key-value pairs that are used to add metadata to pods. Optional. [optional]
mounts List<Mount> Mounts are mounts that will be added to the pod. These will supersede Image Volumes and VolumesFrom volumes where there are conflicts. Optional. [optional]
name String Name is the name of the pod. If not provided, a name will be generated when the pod is created. Optional. [optional]
netns Namespace [optional]
networkOptions Map<String, List<String>> NetworkOptions are additional options for each network Optional. [optional]
noInfra Boolean NoInfra tells the pod not to create an infra container. If this is done, many networking-related options will become unavailable. Conflicts with setting any options in PodNetworkConfig, and the InfraCommand and InfraImages in this struct. Optional. [optional]
noManageHostname Boolean NoManageHostname indicates that /etc/hostname should not be managed by the pod. Instead, each container will create a separate etc/hostname as they would if not in a pod. [optional]
noManageHosts Boolean NoManageHosts indicates that /etc/hosts should not be managed by the pod. Instead, each container will create a separate /etc/hosts as they would if not in a pod. Conflicts with HostAdd. [optional]
noManageResolvConf Boolean NoManageResolvConf indicates that /etc/resolv.conf should not be managed by the pod. Instead, each container will create and manage a separate resolv.conf as if they had not joined a pod. Conflicts with NoInfra=true and DNSServer, DNSSearch, DNSOption. Optional. [optional]
overlayVolumes List<OverlayVolume> Overlay volumes are named volumes that will be added to the pod. Optional. [optional]
pidns Namespace [optional]
podCreateCommand List<String> [optional]
podDevices List<String> Devices contains user specified Devices to be added to the Pod [optional]
portmappings List<PortMapping> PortMappings is a set of ports to map into the infra container. As, by default, containers share their network with the infra container, this will forward the ports to the entire pod. Only available if NetNS is set to Bridge, Slirp, or Pasta. Optional. [optional]
resourceLimits LinuxResources [optional]
restartPolicy String RestartPolicy is the pod's restart policy - an action which will be taken when one or all the containers in the pod exits. If not given, the default policy will be set to Always, which restarts the containers in the pod when they exit indefinitely. Optional. [optional]
restartTries Integer RestartRetries is the number of attempts that will be made to restart the container. Only available when RestartPolicy is set to &quot;on-failure&quot;. Optional. [optional]
securityOpt List<String> [optional]
serviceContainerID String The ID of the pod's service container. [optional]
shareParent Boolean PodCreateCommand is the command used to create this pod. This will be shown in the output of Inspect() on the pod, and may also be used by some tools that wish to recreate the pod (e.g. `podman generate systemd --new`). Optional. ShareParent determines if all containers in the pod will share the pod's cgroup as the cgroup parent [optional]
sharedNamespaces List<String> SharedNamespaces instructs the pod to share a set of namespaces. Shared namespaces will be joined (by default) by every container which joins the pod. If not set and NoInfra is false, the pod will set a default set of namespaces to share. Conflicts with NoInfra=true. Optional. [optional]
shmSize Long ShmSize is the size of the tmpfs to mount in at /dev/shm, in bytes. Conflicts with ShmSize if IpcNS is not private. Optional. [optional]
shmSizeSystemd Long ShmSizeSystemd is the size of systemd-specific tmpfs mounts specifically /run, /run/lock, /var/log/journal and /tmp. Optional [optional]
sysctl Map<String, String> Sysctl sets kernel parameters for the pod [optional]
throttleReadBpsDevice Map<String, LinuxThrottleDevice> ThrottleReadBpsDevice contains the rate at which the devices in the pod can be read from/accessed [optional]
userns Namespace [optional]
utsns Namespace [optional]
volumes List<NamedVolume> Volumes are named volumes that will be added to the pod. These will supersede Image Volumes and VolumesFrom volumes where there are conflicts. Optional. [optional]
volumesFrom List<String> VolumesFrom is a set of containers whose volumes will be added to this pod. The name or ID of the container must be provided, and may optionally be followed by a : and then one or more comma-separated options. Valid options are 'ro', 'rw', and 'z'. Options will be used for all volumes sourced from the container. [optional]

Implemented Interfaces

  • Serializable