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

[IPAM] Core implementation #2828

Merged
merged 2 commits into from
Nov 29, 2024
Merged

Conversation

cheina97
Copy link
Member

@cheina97 cheina97 commented Nov 21, 2024

Description

This PR introduces the new liqo ipam core

It's main features are:

  • Define custom network pools used by the ipam
  • Allocate networks
  • Remap networks and allocate them
  • Allocate IPs from a network
  • Visualize the IPAM using a graphviz file

The IPAM is managed internally using a binary tree, where each node is a network and contains a list of IPs
We used this algorithm https://en.wikipedia.org/wiki/Buddy_memory_allocation to optimize the network allocation

image

@adamjensenbot
Copy link
Collaborator

Hi @cheina97. Thanks for your PR!

I am @adamjensenbot.
You can interact with me issuing a slash command in the first line of a comment.
Currently, I understand the following commands:

  • /rebase: Rebase this PR onto the master branch (You can add the option test=true to launch the tests
    when the rebase operation is completed)
  • /merge: Merge this PR into the master branch
  • /build Build Liqo components
  • /test Launch the E2E and Unit tests
  • /hold, /unhold Add/remove the hold label to prevent merging with /merge

Make sure this PR appears in the liqo changelog, adding one of the following labels:

  • kind/breaking: 💥 Breaking Change
  • kind/feature: 🚀 New Feature
  • kind/bug: 🐛 Bug Fix
  • kind/cleanup: 🧹 Code Refactoring
  • kind/docs: 📝 Documentation

@cheina97
Copy link
Member Author

/build

@cheina97
Copy link
Member Author

/build

@fra98 fra98 changed the title refactor: updated IP controller for new ipam [IPAM] Core implementation Nov 22, 2024
@cheina97 cheina97 force-pushed the frc/ipamcore branch 2 times, most recently from 7fb08dc to cb3df8b Compare November 22, 2024 14:23
@cheina97
Copy link
Member Author

/build

@cheina97
Copy link
Member Author

/build

@cheina97
Copy link
Member Author

/build

@cheina97 cheina97 force-pushed the frc/ipamcore branch 2 times, most recently from 090c495 to 802e9af Compare November 22, 2024 16:09
@cheina97
Copy link
Member Author

/build

@cheina97 cheina97 force-pushed the frc/ipamcore branch 12 times, most recently from f74cf3e to 02478f4 Compare November 25, 2024 17:48
@cheina97
Copy link
Member Author

/build

@cheina97
Copy link
Member Author

/build

@cheina97
Copy link
Member Author

/test

@cheina97 cheina97 force-pushed the frc/ipamcore branch 3 times, most recently from 87e2ec7 to a0935de Compare November 28, 2024 16:17
@cheina97
Copy link
Member Author

/rebase test=true

@cheina97
Copy link
Member Author

/test

pkg/ipam/ipam.go Outdated Show resolved Hide resolved
pkg/ipam/ipam.go Outdated Show resolved Hide resolved
pkg/ipam/sync.go Outdated Show resolved Hide resolved
@cheina97
Copy link
Member Author

/build

1 similar comment
@cheina97
Copy link
Member Author

/build

cmd/ipam/main.go Outdated Show resolved Hide resolved
pkg/ipam/core/ipam.go Outdated Show resolved Hide resolved
pkg/ipam/core/node.go Outdated Show resolved Hide resolved
pkg/ipam/core/node.go Show resolved Hide resolved
pkg/ipam/sync.go Outdated Show resolved Hide resolved
pkg/ipam/sync.go Outdated Show resolved Hide resolved
Copy link
Member

@aleoli aleoli left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In general, I would add some comments on how the algorithm works and the single functions work in the core package

cmd/ipam/main.go Outdated Show resolved Hide resolved
@cheina97
Copy link
Member Author

/rebase test=true

1 similar comment
@cheina97
Copy link
Member Author

/rebase test=true

@cheina97
Copy link
Member Author

/merge

@adamjensenbot adamjensenbot added the merge-requested Request bot merging (automatically managed) label Nov 29, 2024
@adamjensenbot adamjensenbot merged commit b38a260 into liqotech:ipam Nov 29, 2024
9 checks passed
@adamjensenbot adamjensenbot removed the merge-requested Request bot merging (automatically managed) label Nov 29, 2024
@cheina97 cheina97 deleted the frc/ipamcore branch November 29, 2024 18:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants