go-ipam icon indicating copy to clipboard operation
go-ipam copied to clipboard

Support overlapping cidrs/prefixes

Open majst01 opened this issue 4 years ago • 2 comments

Currently cidr/prefix is the primary key, therefore it is not possible to allocate the same prefix for two or more usage scenarios. This restriction is valid for example for internet prefixes, but not for private network prefixes of nodes. They can overlap, the node prefixes must be disjoint, only if communication between the clusters is required.

A possible solution would be to make the primary key a joined primary key from UUID and CIDR/Prefix. The UUID is either totally unique, or a grouping,for example like a project or internet prefix.

Migration of the existing data to the new schema is a hard requirement.

This approach would also help to identify ips more easily in scenarios where they where released and acquired by different users.

@Gerrit91

majst01 avatar May 22 '20 12:05 majst01

New implementation is promising: #43

majst01 avatar Mar 15 '21 07:03 majst01

Another Idea would be to store the prefixes of another namespace in another table instead of adding a new column in postgres.

majst01 avatar Jul 26 '22 09:07 majst01