From cf3c027960939f85311d90aa227050e01084a1c7 Mon Sep 17 00:00:00 2001 From: Alban Crequy Date: Tue, 26 Jan 2016 18:54:56 +0100 Subject: [PATCH] *: add "dns" field to the configuration appc/cni#76 added a "dns" field in the result JSON. But before this patch, the plugins had no way of knowing which name server to return. There could be two ways of knowing which name server to return: 1. add it as an extra argument ("CNI_ARGS") 2. add it in the network configuration as a convenience (received via stdin) I chose the second way because it is easier. In the case of rkt, it means the user could just add the DNS name servers in /etc/rkt/net.d/mynetwork.conf. --- ptp.md | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/ptp.md b/ptp.md index e7f2ffe7..acde8515 100644 --- a/ptp.md +++ b/ptp.md @@ -14,7 +14,11 @@ The traffic of the container interface will be routed through the interface of t "ipam": { "type": "host-local", "subnet": "10.1.1.0/24" - } + }, + "dns": [ + "8.8.8.8", + "8.8.4.4" + ] } ## Network configuration reference @@ -24,3 +28,4 @@ The traffic of the container interface will be routed through the interface of t * `ipMasq` (boolean, optional): set up IP Masquerade on the host for traffic originating from this network and destined outside of it. Defaults to false. * `mtu` (integer, optional): explicitly set MTU to the specified value. Defaults to value chosen by the kernel. * `ipam` (dictionary, required): IPAM configuration to be used for this network. +* `dns` (string array, optional): name servers to return as is in the [Result](/SPEC.md#result). Defaults to empty list.