From 7b4102ce286b5b52f5cbd9df832222f7c543e35c Mon Sep 17 00:00:00 2001 From: Matthew Heon Date: Wed, 7 Aug 2019 14:29:20 -0400 Subject: Adjust name of Podman CNI network bridge Both Podman and CRI-O set up CNI bridges with the name 'cni0'. If both our CNI conflist and the CRI-O conflist are installed, whoever runs first will win - that is, they will configure the bridge, and everyone will use it. Problem: the CRI-O CNI config conflicts with ours and results in containers with no networking. Solution: rename our bridge so we don't conflict with CRI-O. At the same time, hit our IPAM configuration. The current version was an older format in danger of deprecation. The new format is documented at [1]. Finally, fix indentation for the entire file. [1] https://github.com/containernetworking/plugins/tree/master/plugins/ipam/host-local#example-configurations Signed-off-by: Matthew Heon --- cni/87-podman-bridge.conflist | 55 +++++++++++++++++++++++++------------------ 1 file changed, 32 insertions(+), 23 deletions(-) (limited to 'cni') diff --git a/cni/87-podman-bridge.conflist b/cni/87-podman-bridge.conflist index 729d543ec..9db416a19 100644 --- a/cni/87-podman-bridge.conflist +++ b/cni/87-podman-bridge.conflist @@ -2,28 +2,37 @@ "cniVersion": "0.4.0", "name": "podman", "plugins": [ - { - "type": "bridge", - "bridge": "cni0", - "isGateway": true, - "ipMasq": true, - "ipam": { - "type": "host-local", - "subnet": "10.88.0.0/16", - "routes": [ - { "dst": "0.0.0.0/0" } - ] - } - }, - { - "type": "portmap", - "capabilities": { - "portMappings": true - } - }, - { - "type": "firewall", - "backend": "iptables" - } + { + "type": "bridge", + "bridge": "cni-podman0", + "isGateway": true, + "ipMasq": true, + "ipam": { + "type": "host-local", + "routes": [ + { + "dst": "0.0.0.0/0" + } + ], + "ranges": [ + [ + { + "subnet": "10.88.0.0/16", + "gateway": "10.88.0.1" + } + ] + ] + } + }, + { + "type": "portmap", + "capabilities": { + "portMappings": true + } + }, + { + "type": "firewall", + "backend": "iptables" + } ] } -- cgit v1.2.3-54-g00ecf