Struct podman_api::models::PodSpecGenerator[][src]

pub struct PodSpecGenerator {
Show 28 fields pub cgroup_parent: Option<String>, pub cni_networks: Option<Vec<String, Global>>, pub cpu_period: Option<i64>, pub cpu_quota: Option<i64>, pub dns_option: Option<Vec<String, Global>>, pub dns_search: Option<Vec<String, Global>>, pub dns_server: Option<Vec<Vec<i32, Global>, Global>>, pub hostadd: Option<Vec<String, Global>>, pub hostname: Option<String>, pub infra_command: Option<Vec<String, Global>>, pub infra_conmon_pid_file: Option<String>, pub infra_image: Option<String>, pub infra_name: Option<String>, pub labels: Option<HashMap<String, String, RandomState>>, pub name: Option<String>, pub netns: Option<Namespace>, pub network_options: Option<HashMap<String, Vec<String, Global>, RandomState>>, pub no_infra: Option<bool>, pub no_manage_hosts: Option<bool>, pub no_manage_resolv_conf: Option<bool>, pub pidns: Option<Namespace>, pub pod_create_command: Option<Vec<String, Global>>, pub portmappings: Option<Vec<PortMapping, Global>>, pub resource_limits: Option<LinuxResources>, pub shared_namespaces: Option<Vec<String, Global>>, pub static_ip: Option<Vec<i32, Global>>, pub static_mac: Option<Vec<i32, Global>>, pub userns: Option<Namespace>,
}
Expand description

PodSpecGenerator describes options to create a pod

Fields

cgroup_parent: Option<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.

cni_networks: Option<Vec<String, Global>>

CNINetworks is a list of CNI networks that the infra container will join. As, by default, containers share their network with the infra container, these networks will effectively be joined by the entire pod. Only available when NetNS is set to Bridge, the default for root. Optional.

cpu_period: Option<i64>

CPU period of the cpuset, determined by –cpus

cpu_quota: Option<i64>

CPU quota of the cpuset, determined by –cpus

dns_option: Option<Vec<String, Global>>

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.

dns_search: Option<Vec<String, Global>>

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.

dns_server: Option<Vec<Vec<i32, Global>, Global>>

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.

hostadd: Option<Vec<String, Global>>

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.

hostname: Option<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.

infra_command: Option<Vec<String, Global>>

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.

infra_conmon_pid_file: Option<String>

InfraConmonPidFile is a custom path to store the infra container’s conmon PID.

infra_image: Option<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.

infra_name: Option<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.

labels: Option<HashMap<String, String, RandomState>>

Labels are key-value pairs that are used to add metadata to pods. Optional.

name: Option<String>

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

netns: Option<Namespace>network_options: Option<HashMap<String, Vec<String, Global>, RandomState>>

NetworkOptions are additional options for each network Optional.

no_infra: Option<bool>

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.

no_manage_hosts: Option<bool>

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.

no_manage_resolv_conf: Option<bool>

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.

pidns: Option<Namespace>pod_create_command: Option<Vec<String, Global>>

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.

portmappings: Option<Vec<PortMapping, Global>>

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

resource_limits: Option<LinuxResources>shared_namespaces: Option<Vec<String, Global>>

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.

static_ip: Option<Vec<i32, Global>>static_mac: Option<Vec<i32, Global>>userns: Option<Namespace>

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

Deserialize this value from the given Serde deserializer. Read more

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

Serialize this value into the given Serde serializer. 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

Performs the conversion.

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

Performs the conversion.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

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