diff options
author | baude <bbaude@redhat.com> | 2019-10-03 15:22:40 -0500 |
---|---|---|
committer | baude <bbaude@redhat.com> | 2019-10-28 12:52:30 -0500 |
commit | 2f6b8b94e87bb3645d34e59dd3b748dba4aa4d2c (patch) | |
tree | 5bf28fa1f061cb8193dc4e88e6c4e0144bd29e28 /pkg/network/config.go | |
parent | ac73fd3fe5dcbf2647d589f9c9f37fe9531ed663 (diff) | |
download | podman-2f6b8b94e87bb3645d34e59dd3b748dba4aa4d2c.tar.gz podman-2f6b8b94e87bb3645d34e59dd3b748dba4aa4d2c.tar.bz2 podman-2f6b8b94e87bb3645d34e59dd3b748dba4aa4d2c.zip |
enable dnsplugin for network create
when users create a new network and the dnsname plugin can be found by
podman, we will enable container name resolution on the new network.
there is an option to opt *out* as well.
tests cannot be added until we solve the packaging portion of the
dnsname plugin.
Signed-off-by: baude <bbaude@redhat.com>
Diffstat (limited to 'pkg/network/config.go')
-rw-r--r-- | pkg/network/config.go | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/pkg/network/config.go b/pkg/network/config.go index 7eaa83833..37eb0dd64 100644 --- a/pkg/network/config.go +++ b/pkg/network/config.go @@ -14,6 +14,9 @@ const ( // CNIDeviceName is the default network device name and in // reality should have an int appended to it (cni-podman4) CNIDeviceName = "cni-podman" + // DefaultPodmanDomainName is used for the dnsname plugin to define + // a localized domain name for a created network + DefaultPodmanDomainName = "dns.podman" ) // GetDefaultPodmanNetwork outputs the default network for podman @@ -97,3 +100,14 @@ type FirewallConfig struct { func (f FirewallConfig) Bytes() ([]byte, error) { return json.MarshalIndent(f, "", "\t") } + +// DNSNameConfig describes the dns container name resolution plugin config +type DNSNameConfig struct { + PluginType string `json:"type"` + DomainName string `json:"domainName"` +} + +// Bytes outputs the configuration as []byte +func (d DNSNameConfig) Bytes() ([]byte, error) { + return json.MarshalIndent(d, "", "\t") +} |