ovn-org / ovn-kubernetes

A robust Kubernetes networking platform
https://ovn-kubernetes.io/
Apache License 2.0
767 stars 333 forks source link

allocator: Add user defined networks allocators #4458

Open qinqon opened 1 week ago

qinqon commented 1 week ago

What this PR does and why is it needed

Allocate the different kind of IDs needed by user defined networks:

It also introduce the configuration fields to calculate the IDs.

Special notes for reviewers

The "iputils.NextIP" functionas has being copied and modified to be able to directly increment by a number instead of iterating.

This PR add just the config fields but they are not wired up with validation or command line.

How to verify it

There are some unit test tesing the base function of the allocator

Details to documentation updates

NONE

Description for the changelog

Add user defined network allocators

Does this PR introduce a user-facing change?

NONE

Add user defined network allocators
coveralls commented 1 week ago

Coverage Status

Changes unknown when pulling af14b5b574e9433154eb9ad7b879f88ece2dcf8e on qinqon:net-segmentation-id-allocator into on ovn-org:master.

qinqon commented 4 days ago

@tssurya adding events here is worth it ?

coveralls commented 4 days ago

Coverage Status

coverage: 52.771% (+0.06%) from 52.707% when pulling 43c57c40391d243ab1bc5d70d274494a00e7deb8 on qinqon:net-segmentation-id-allocator into ebf2c6849cbd2f5164b9f062892a7b8483892ea4 on ovn-org:master.

coveralls commented 4 days ago

Coverage Status

coverage: 52.763% (+0.05%) from 52.716% when pulling ab1def21ce43115e17f12ac40a461fe29536e2a1 on qinqon:net-segmentation-id-allocator into 0058357786cac08f5941c4cb4d8c4f7760a98571 on ovn-org:master.

qinqon commented 4 days ago

I think first 4 commits are missing UTs + we should add docs for these https://ovn-kubernetes.io/getting-started/configuration/#gateway-config once we finalize them reviewed half way till commit6 thanks for the split makes it easy.

I will add the unit test and the docs.

coveralls commented 3 days ago

Coverage Status

Changes unknown when pulling a71b1b8f2de8859b62eb7b42be07ef5e93ef8530 on qinqon:net-segmentation-id-allocator into on ovn-org:master.

coveralls commented 2 days ago

Coverage Status

coverage: 52.734%. remained the same when pulling 99b529263520572745116d5b17bd28dc1e0486c9 on qinqon:net-segmentation-id-allocator into 798eb141b427aaba1c909124a9c47acc38a3f1b4 on ovn-org:master.

coveralls commented 1 day ago

Coverage Status

Changes unknown when pulling a9549466f38eed334a8dbb7245ccdd02dc489fb1 on qinqon:net-segmentation-id-allocator into on ovn-org:master.

coveralls commented 1 day ago

Coverage Status

coverage: 52.683% (-0.05%) from 52.731% when pulling 300eac78fe17546eaee055432cfa915a235a69d4 on qinqon:net-segmentation-id-allocator into aec9e5a893d16ce7fb0a1d8791e0915cd560e2f4 on ovn-org:master.