From b7b5b6f8e3072530f4c3fc07e5960e54c90729b5 Mon Sep 17 00:00:00 2001 From: baude Date: Thu, 29 Oct 2020 15:54:33 -0500 Subject: network aliases for container creation podman can now support adding network aliases when running containers (--network-alias). It requires an updated dnsname plugin as well as an updated ocicni to work properly. Signed-off-by: baude --- libpod/network/config.go | 5 +++-- libpod/network/netconflist.go | 7 +++++-- 2 files changed, 8 insertions(+), 4 deletions(-) (limited to 'libpod/network') diff --git a/libpod/network/config.go b/libpod/network/config.go index a08e684d8..ce8a4446c 100644 --- a/libpod/network/config.go +++ b/libpod/network/config.go @@ -131,8 +131,9 @@ func (f FirewallConfig) Bytes() ([]byte, error) { // DNSNameConfig describes the dns container name resolution plugin config type DNSNameConfig struct { - PluginType string `json:"type"` - DomainName string `json:"domainName"` + PluginType string `json:"type"` + DomainName string `json:"domainName"` + Capabilities map[string]bool `json:"capabilities"` } // Bytes outputs the configuration as []byte diff --git a/libpod/network/netconflist.go b/libpod/network/netconflist.go index 8187fdb39..13f472413 100644 --- a/libpod/network/netconflist.go +++ b/libpod/network/netconflist.go @@ -126,9 +126,12 @@ func NewFirewallPlugin() FirewallConfig { // NewDNSNamePlugin creates the dnsname config with a given // domainname func NewDNSNamePlugin(domainName string) DNSNameConfig { + caps := make(map[string]bool, 1) + caps["aliases"] = true return DNSNameConfig{ - PluginType: "dnsname", - DomainName: domainName, + PluginType: "dnsname", + DomainName: domainName, + Capabilities: caps, } } -- cgit v1.2.3-54-g00ecf