cni-genie / CNI-Genie

CNI-Genie for choosing pod network of your choice during deployment time. Supported pod networks - Calico, Flannel, Romana, Weave
https://github.com/cni-genie/CNI-Genie/
Apache License 2.0
534 stars 121 forks source link

CNI-Genie requires non-IPAM configuration #166

Open knollpoi opened 5 years ago

knollpoi commented 5 years ago

CNI-Genie fails to configure pod if IPAM plugin configuration is empty, even though empty IPAM configuration is valid.

Example: I desire to create an L2 Bridge using the "bridge" plugin:

Desired CNI configuration: { "name": "mybridge01", "type": "bridge", "hairpinMode": false, "bridge": "mbr01", "isGateway": false, "ipam": {} }

When the pod is launched referencing this plugin, CNI Genie reports "no plugin name provided".

Adding an IPAM configuration results in successful pod launch.

Required CNI configuration: { "name": "mybridge01", "type": "bridge", "hairpinMode": false, "bridge": "mbr01", "isGateway": false, "ipam": { "type": "host-local", "subnet": "10.254.254.0/24"} }

This happens with the macvlan plugin, too. Does not appear to be a problem when these plugins are used without CNI-Genie.

sushanthakumar commented 5 years ago

@knoll01 , Thanks for bringing out this case, we shall analyse it further and update you

sushanthakumar commented 5 years ago

@knoll01 , we did this operation without installation of genie. We got the same error image

Error is coming from cni module. Looks like they are expecting some para (may be type) in ipam. You can have a look at cni logic or some cni folks might help Anyway genie does not check/validate this ipam content, if cni can accept it, it will be through. Feel free to ask any question on this so that this issue can be resolved, thanks