diff options
author | Matthew Heon <matthew.heon@pm.me> | 2020-02-03 11:17:32 -0500 |
---|---|---|
committer | Matthew Heon <mheon@redhat.com> | 2020-02-04 10:07:14 -0500 |
commit | 07a8ab09e05052e6776395ba3b0275d7f9921ef2 (patch) | |
tree | 24bc3a17d337aae463b74421532c78132921fc50 /libpod/pod.go | |
parent | 28eb296653f78f462c07e3fe6b156bc093ff44c6 (diff) | |
download | podman-07a8ab09e05052e6776395ba3b0275d7f9921ef2.tar.gz podman-07a8ab09e05052e6776395ba3b0275d7f9921ef2.tar.bz2 podman-07a8ab09e05052e6776395ba3b0275d7f9921ef2.zip |
Add backend code for pod network options
This adds network-related options to the pod in the database. We
are going to add the CLI frontend in further patches.
In short, this should greatly improve the ability of pods to
configure networking, once the CLI parsing is added.
Signed-off-by: Matthew Heon <matthew.heon@pm.me>
Diffstat (limited to 'libpod/pod.go')
-rw-r--r-- | libpod/pod.go | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/libpod/pod.go b/libpod/pod.go index 3b9bb9c60..4f85caf08 100644 --- a/libpod/pod.go +++ b/libpod/pod.go @@ -1,6 +1,7 @@ package libpod import ( + "net" "time" "github.com/containers/libpod/libpod/define" @@ -97,8 +98,17 @@ type PodContainerInfo struct { // InfraContainerConfig is the configuration for the pod's infra container type InfraContainerConfig struct { - HasInfraContainer bool `json:"makeInfraContainer"` - PortBindings []ocicni.PortMapping `json:"infraPortBindings"` + HasInfraContainer bool `json:"makeInfraContainer"` + PortBindings []ocicni.PortMapping `json:"infraPortBindings"` + StaticIP net.IP `json:"staticIP,omitempty"` + StaticMAC net.HardwareAddr `json:"staticMAC,omitempty"` + UseImageResolvConf bool `json:"useImageResolvConf,omitempty"` + DNSServer []string `json:"dnsServer,omitempty"` + DNSSearch []string `json:"dnsSearch,omitempty"` + DNSOption []string `json:"dnsOption,omitempty"` + UseImageHosts bool `json:"useImageHosts,omitempty"` + HostAdd []string `json:"hostsAdd,omitempty"` + Networks []string `json:"networks,omitempty"` } // ID retrieves the pod's ID |