Class PodNetworkConfig
java.lang.Object
io.github.alersrt.pod4j.openapi.model.PodNetworkConfig
@Generated(value="org.openapitools.codegen.languages.JavaClientCodegen",
date="2024-11-19T11:19:05.435500352+07:00[Asia/Barnaul]",
comments="Generator version: 7.7.0")
public class PodNetworkConfig
extends Object
PodNetworkConfig
-
Nested Class Summary
Nested Classes -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddCniNetworksItem(String cniNetworksItem) addDnsOptionItem(String dnsOptionItem) addDnsSearchItem(String dnsSearchItem) addDnsServerItem(String dnsServerItem) addHostaddItem(String hostaddItem) addPortmappingsItem(PortMapping portmappingsItem) cniNetworks(List<String> cniNetworks) booleanstatic PodNetworkConfigCreate an instance of PodNetworkConfig given an JSON stringCNINetworks is a list of CNI networks to join the container to.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.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.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.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.getNetns()Get netnsNetworkOptions are additional options for each network Optional.Map of networks names to ids the container should join to.NoManageHosts indicates that /etc/hosts should not be managed by the pod.NoManageResolvConf indicates that /etc/resolv.conf should not be managed by the pod.PortMappings is a set of ports to map into the infra container.inthashCode()networkOptions(Map<String, List<String>> networkOptions) networks(Map<String, PerNetworkOptions> networks) noManageHosts(Boolean noManageHosts) noManageResolvConf(Boolean noManageResolvConf) portmappings(List<PortMapping> portmappings) putNetworkOptionsItem(String key, List<String> networkOptionsItem) putNetworksItem(String key, PerNetworkOptions networksItem) voidsetCniNetworks(List<String> cniNetworks) voidsetDnsOption(List<String> dnsOption) voidsetDnsSearch(List<String> dnsSearch) voidsetDnsServer(List<String> dnsServer) voidsetHostadd(List<String> hostadd) voidvoidsetNetworkOptions(Map<String, List<String>> networkOptions) voidsetNetworks(Map<String, PerNetworkOptions> networks) voidsetNoManageHosts(Boolean noManageHosts) voidsetNoManageResolvConf(Boolean noManageResolvConf) voidsetPortmappings(List<PortMapping> portmappings) toJson()Convert an instance of PodNetworkConfig to an JSON stringtoString()static voidvalidateJsonElement(com.google.gson.JsonElement jsonElement) Validates the JSON Element and throws an exception if issues found
-
Field Details
-
SERIALIZED_NAME_NETWORKS
- See Also:
-
SERIALIZED_NAME_CNI_NETWORKS
- See Also:
-
SERIALIZED_NAME_DNS_OPTION
- See Also:
-
SERIALIZED_NAME_DNS_SEARCH
- See Also:
-
SERIALIZED_NAME_DNS_SERVER
- See Also:
-
SERIALIZED_NAME_HOSTADD
- See Also:
-
SERIALIZED_NAME_NETNS
- See Also:
-
SERIALIZED_NAME_NETWORK_OPTIONS
- See Also:
-
SERIALIZED_NAME_NO_MANAGE_HOSTS
- See Also:
-
SERIALIZED_NAME_NO_MANAGE_RESOLV_CONF
- See Also:
-
SERIALIZED_NAME_PORTMAPPINGS
- See Also:
-
openapiFields
-
openapiRequiredFields
-
-
Constructor Details
-
PodNetworkConfig
public PodNetworkConfig()
-
-
Method Details
-
networks
-
putNetworksItem
-
getNetworks
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.- Returns:
- networks
-
setNetworks
-
cniNetworks
-
addCniNetworksItem
-
getCniNetworks
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.- Returns:
- cniNetworks
-
setCniNetworks
-
dnsOption
-
addDnsOptionItem
-
getDnsOption
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.- Returns:
- dnsOption
-
setDnsOption
-
dnsSearch
-
addDnsSearchItem
-
getDnsSearch
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.- Returns:
- dnsSearch
-
setDnsSearch
-
dnsServer
-
addDnsServerItem
-
getDnsServer
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.- Returns:
- dnsServer
-
setDnsServer
-
hostadd
-
addHostaddItem
-
getHostadd
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.- Returns:
- hostadd
-
setHostadd
-
netns
-
getNetns
Get netns- Returns:
- netns
-
setNetns
-
networkOptions
-
putNetworkOptionsItem
-
getNetworkOptions
NetworkOptions are additional options for each network Optional.- Returns:
- networkOptions
-
setNetworkOptions
-
noManageHosts
-
getNoManageHosts
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.- Returns:
- noManageHosts
-
setNoManageHosts
-
noManageResolvConf
-
getNoManageResolvConf
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.- Returns:
- noManageResolvConf
-
setNoManageResolvConf
-
portmappings
-
addPortmappingsItem
-
getPortmappings
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.- Returns:
- portmappings
-
setPortmappings
-
equals
-
hashCode
public int hashCode() -
toString
-
validateJsonElement
Validates the JSON Element and throws an exception if issues found- Parameters:
jsonElement- JSON Element- Throws:
IOException- if the JSON Element is invalid with respect to PodNetworkConfig
-
fromJson
Create an instance of PodNetworkConfig given an JSON string- Parameters:
jsonString- JSON string- Returns:
- An instance of PodNetworkConfig
- Throws:
IOException- if the JSON string is invalid with respect to PodNetworkConfig
-
toJson
Convert an instance of PodNetworkConfig to an JSON string- Returns:
- JSON string
-