pub struct PodCreateOptsBuilder { /* private fields */ }
Expand description

A builder struct for PodCreateOpts.

Implementations§

Finish building PodCreateOpts.

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.

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 “Networks” instead.

CPU period of the cpuset, determined by –cpus

CPU quota of the cpuset, determined by –cpus

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 no_infra == true.

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 no_infra == true.

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 no_infra == true.

Determines the pod’s exit and stop behaviour.

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 no_infra == true and no_manage_hosts.

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.

Used for specifying how ID mapping should be set up for a layer or container.

Image volumes bind-mount a container-image mount into the pod’s infra container.

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 no_infra == true.

Custom path to store the infra container’s conmon PID.

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 no_infra == true.

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 no_infra == true.

Key-value pairs that are used to add metadata to a pod.

Mounts are mounts that will be added to the pod. These will supersede image_volumes and volumes_from volumes where there are conflicts.

The name of the pod. If not provided, a name will be generated when the pod is created.

Additional options for each network.

tells the pod not to create an infra container. If this is done, many networking-related options will become unavailable. Conflicts with any network or infra related settings.

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 add_hosts.

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 dns_server, dns_search, dns_option, no_infra.

Overlay volumes are named volumes that will be added to the pod.

The command used to create this pod. This will be shown in the output of Inspect() on the pode and may also be used by some tools that wish to recreate the pod (e.g. podman generate systemd –new).

User specified Devices to be added to the Pod.

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 or Slirp.

Container runtime resource constraints.

The ID of the pod’s service container.

ShareParent determines if all containers in the pod will share the pod’s cgroup as the cgroup parent.

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 no_infra == true.

The size of the tmpfs to mount in at /dev/shm, in bytes.

Volumes are named volumes that will be added to the pod. These will supersede image_volumes and volumes_from volumes where there are conflicts.

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.

Trait Implementations§

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Formats the value using the given formatter. Read more
Returns the “default value” for a type. Read more

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.
Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more