Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support descending search order #69

Merged
merged 4 commits into from
Dec 2, 2023

Conversation

wusendong
Copy link

@wusendong wusendong commented Nov 10, 2023

According to the official documentation on service-ip-static-sub-range , Kubernetes prefers to allocate dynamic IP addresses to Services by choosing from the upper band.

I've come up with a similar situation, where existing servers are already occupying the lower IP segments, so in order to minimize conflicts, dynamic IP allocation should be in descending order of precedence.

The PR also fix cidr network should ignore NetworkID and BroadcastIP which some cidr network's BroadcastIP is not xxx.xxx.xxx.255.

Signed-off-by: Wu Sendong <wusendong@live.com>
Signed-off-by: Wu Sendong <wusendong@live.com>
@wusendong wusendong force-pushed the feat/descending_order branch from e7fa7a9 to 905578a Compare November 10, 2023 06:58
@thebsdbox
Copy link
Contributor

Minor nit, but a fantastic addition!

@wusendong wusendong force-pushed the feat/descending_order branch from 1430562 to 22b1f2a Compare November 13, 2023 01:49
Signed-off-by: Wu Sendong <wusendong@live.com>
Signed-off-by: Wu Sendong <wusendong@live.com>
@wusendong wusendong force-pushed the feat/descending_order branch from baedca2 to 255e0fb Compare November 13, 2023 03:48
@wusendong
Copy link
Author

For these changes, I have tested in my RKE2 cluster.
image
image

@thebsdbox thebsdbox merged commit e11cc57 into kube-vip:main Dec 2, 2023
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants