Skip to content

Commit

Permalink
libnetwork: add DNSServers to NetworkOptions
Browse files Browse the repository at this point in the history
Netavark now accets `dns_servers` for each container which allows
containers to use custom DNS servers as resolvers instead of falling
back to host's resolver.

Following field allows callers to libnetwork to pass newly added field
to `netavark` and `aarvark-dns`

Actual feature implemented
* containers/aardvark-dns#240
* containers/netavark#452

[NO NEW TESTS NEEDED]
[NO TESTS NEEDED]

Signed-off-by: Aditya R <[email protected]>
  • Loading branch information
flouthoc committed Oct 17, 2022
1 parent e773600 commit ddd8abb
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions libnetwork/types/network.go
Original file line number Diff line number Diff line change
Expand Up @@ -226,6 +226,9 @@ type NetworkOptions struct {
// Networks contains all networks with the PerNetworkOptions.
// The map should contain at least one element.
Networks map[string]PerNetworkOptions `json:"networks"`
// List of custom DNS server for podman's DNS resolver.
// Priority order will be kept as defined by user in the configuration.
DNSServers []string `json:"dns_servers"`
}

// PortMapping is one or more ports that will be mapped into the container.
Expand Down

0 comments on commit ddd8abb

Please sign in to comment.