forked from containers/common
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
libnetwork/cni: add support for arbitrary ipam plugins
When we parse CNI config files to convert them into a native Network struct we should not error unless there is something broken. The goal is to allow all cni configs to still function but podman inspect will not be able to show all informations such as subnets about this network. Because this is a valid use case we only log this at info level. Fixes containers/podman#12990 Fixes containers/podman#13124 Signed-off-by: Paul Holzinger <[email protected]>
- Loading branch information
Showing
6 changed files
with
160 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
{ | ||
"cniVersion": "0.4.0", | ||
"name": "ipam-empty", | ||
"plugins": [ | ||
{ | ||
"type": "bridge", | ||
"bridge": "cni-podman124", | ||
"isGateway": true, | ||
"ipMasq": true, | ||
"hairpinMode": true, | ||
"ipam": {} | ||
}, | ||
{ | ||
"type": "portmap", | ||
"capabilities": { | ||
"portMappings": true | ||
} | ||
}, | ||
{ | ||
"type": "firewall", | ||
"backend": "" | ||
}, | ||
{ | ||
"type": "tuning" | ||
}, | ||
{ | ||
"type": "dnsname", | ||
"domainName": "dns.podman", | ||
"capabilities": { | ||
"aliases": true | ||
} | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
{ | ||
"cniVersion": "0.4.0", | ||
"name": "ipam-none", | ||
"plugins": [ | ||
{ | ||
"type": "bridge", | ||
"bridge": "cni-podman123", | ||
"isGateway": true, | ||
"ipMasq": true, | ||
"hairpinMode": true | ||
}, | ||
{ | ||
"type": "portmap", | ||
"capabilities": { | ||
"portMappings": true | ||
} | ||
}, | ||
{ | ||
"type": "firewall", | ||
"backend": "" | ||
}, | ||
{ | ||
"type": "tuning" | ||
}, | ||
{ | ||
"type": "dnsname", | ||
"domainName": "dns.podman", | ||
"capabilities": { | ||
"aliases": true | ||
} | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
{ | ||
"cniVersion": "0.4.0", | ||
"name": "ipam-static", | ||
"plugins": [ | ||
{ | ||
"type": "bridge", | ||
"bridge": "cni-podman125", | ||
"isGateway": true, | ||
"ipMasq": true, | ||
"hairpinMode": true, | ||
"ipam": { | ||
"type": "static", | ||
"routes": [ | ||
{ | ||
"dst": "0.0.0.0/0" | ||
} | ||
], | ||
"addresses": [ | ||
[ | ||
{ | ||
"subnet": "10.89.0.89/16", | ||
"gateway": "10.89.0.1" | ||
} | ||
] | ||
] | ||
} | ||
}, | ||
{ | ||
"type": "portmap", | ||
"capabilities": { | ||
"portMappings": true | ||
} | ||
}, | ||
{ | ||
"type": "firewall", | ||
"backend": "" | ||
}, | ||
{ | ||
"type": "tuning" | ||
}, | ||
{ | ||
"type": "dnsname", | ||
"domainName": "dns.podman", | ||
"capabilities": { | ||
"aliases": true | ||
} | ||
} | ||
] | ||
} |