containernetworking / plugins

Some reference and example networking plugins, maintained by the CNI team.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

ptp: Enabling L2 mode

Tjaarda1 opened this issue · comments

commented

Current Situation:

When utilizing the PTP plugin to establish a connection between two containers, the current workflow necessitates the use of IP Address Management (IPAM) to assign IP addresses to the connected veth pair.

Enhancement Proposal:

It would greatly enhance the usability of the PTP plugin if there were an option to create the veth pair without explicitly specifying IP addresses. This would parallel the simplicity offered by bridge configurations, making the PTP plugin more versatile. In certain scenarios, the use of PTP proves to be a superior alternative to bridge configurations, and eliminating the mandatory requirement for IP addresses would streamline the setup process.

Expected Behavior:

  • Users should have the flexibility to create a PTP connection between containers without the obligation to provide explicit IP addresses.

  • This enhancement would align the PTP plugin's functionality more closely with the user-friendly experience offered by bridge configurations.

Can't you just leave IPAM plugin out?

commented

Can't you just leave IPAM plugin out?

No, the documentation specifies it is a required field. Leaving it as an empty dictionary will result in an unexpected behavior, with the message "no plugin name provided". (While if you fill the IPAM fields, it will work as expected). This behavior has been tested both in a microk8s cluster and a kubeadm one.

Edit: I've checked the code and in the bridge plugin this option is contemplated by checking the value of the IPAM field, while in ptp, it's not the case.