pub struct PodNetworkConfig {
pub networks: Option<HashMap<String, PerNetworkOptions>>,
pub cni_networks: Option<Vec<String>>,
pub dns_option: Option<Vec<String>>,
pub dns_search: Option<Vec<String>>,
pub dns_server: Option<Vec<String>>,
pub hostadd: Option<Vec<String>>,
pub netns: Option<Box<Namespace>>,
pub network_options: Option<HashMap<String, Vec<String>>>,
pub no_manage_hosts: Option<bool>,
pub no_manage_resolv_conf: Option<bool>,
pub portmappings: Option<Vec<PortMapping>>,
}
Fields§
§networks: Option<HashMap<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.
cni_networks: Option<Vec<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 "Networks" instead.
dns_option: Option<Vec<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.
dns_search: Option<Vec<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.
dns_server: Option<Vec<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.
hostadd: Option<Vec<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.
netns: Option<Box<Namespace>>
§network_options: Option<HashMap<String, Vec<String>>>
NetworkOptions are additional options for each network 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.
portmappings: Option<Vec<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.
Implementations§
source§impl PodNetworkConfig
impl PodNetworkConfig
pub fn new() -> PodNetworkConfig
Trait Implementations§
source§impl Clone for PodNetworkConfig
impl Clone for PodNetworkConfig
source§fn clone(&self) -> PodNetworkConfig
fn clone(&self) -> PodNetworkConfig
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for PodNetworkConfig
impl Debug for PodNetworkConfig
source§impl Default for PodNetworkConfig
impl Default for PodNetworkConfig
source§fn default() -> PodNetworkConfig
fn default() -> PodNetworkConfig
source§impl<'de> Deserialize<'de> for PodNetworkConfig
impl<'de> Deserialize<'de> for PodNetworkConfig
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
source§impl PartialEq for PodNetworkConfig
impl PartialEq for PodNetworkConfig
source§fn eq(&self, other: &PodNetworkConfig) -> bool
fn eq(&self, other: &PodNetworkConfig) -> bool
self
and other
values to be equal, and is used
by ==
.source§impl Serialize for PodNetworkConfig
impl Serialize for PodNetworkConfig
impl StructuralPartialEq for PodNetworkConfig
Auto Trait Implementations§
impl Freeze for PodNetworkConfig
impl RefUnwindSafe for PodNetworkConfig
impl Send for PodNetworkConfig
impl Sync for PodNetworkConfig
impl Unpin for PodNetworkConfig
impl UnwindSafe for PodNetworkConfig
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)