Skip to content

Commit ac00d84

Browse files
author
Ian Campbell
committed
bridge: pull settings out into variables.
This is a precursor to configurability. Signed-off-by: Ian Campbell <ijc@docker.com>
1 parent 7d53aab commit ac00d84

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

yml/bridge.yml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@ onboot:
66
- "-c"
77
- |
88
set -ex
9+
subnet='"10.1.0.0/16"'
10+
gateway='"10.1.0.1"'
11+
ns='"10.1.0.1"'
912
cat <<EOF >/var/lib/cni/conf/10-default.conflist
1013
{
1114
"cniVersion": "0.3.1",
@@ -19,11 +22,11 @@ onboot:
1922
"hairpinMode": true,
2023
"ipam": {
2124
"type": "host-local",
22-
"subnet": "10.1.0.0/16",
23-
"gateway": "10.1.0.1"
25+
"subnet": $subnet,
26+
"gateway": $gateway
2427
},
2528
"dns": {
26-
"nameservers": ["10.1.0.1"]
29+
"nameservers": [$ns]
2730
}
2831
},
2932
{

0 commit comments

Comments
 (0)