-
Notifications
You must be signed in to change notification settings - Fork 1.4k
feat: Add IPAM block cleanup for removed nodes #10428
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
base: master
Are you sure you want to change the base?
Conversation
This adds a new CleanupBlocksForRemovedNodes method to the IPAM interface and implements a new CLI command 'calicoctl ipam clean orphaned-blocks' to help administrators clean up IPAM blocks for nodes that no longer exist. The implementation includes: - New interface method in libcalico-go/lib/ipam/interface.go - Implementation in libcalico-go/lib/ipam/cleanup.go - CLI command in calicoctl/calicoctl/commands/ipam/clean.go - Test support in kube-controllers/pkg/controllers/node/fake_ipam_cleaner.go This resolves the issue of slow IPAM block release when nodes are removed from the cluster, providing a built-in alternative to external cleanup scripts.
|
@Kevinz857 thanks for the PR! I have a few questions I'd like to talk about before getting too deep into the review:
|
Is there a particular GitHub issue you are referring to? |
@caseydavenport about this issue #8548 We are a scenario where K8s nodes frequently scale. Here, we will find that the release speed of ipamblocks is very slow, which leads to insufficient ipamblocks. At this time, manual cleaning is often required |
@Kevinmmt the linked issue is primarily about releasing handles automatically, which the I just did some work in this area that should substantially improve IPAM garbage collection performance and speed: #7508 (comment) Might be worth seeing if those changes fix your situation. If not, then I think the |
This adds a new CleanupBlocksForRemovedNodes method to the IPAM interface and implements a new CLI command 'calicoctl ipam clean orphaned-blocks' to help administrators clean up IPAM blocks for nodes that no longer exist.
The implementation includes:
This resolves the issue of slow IPAM block release when nodes are removed from the cluster, providing a built-in alternative to external cleanup scripts.
Description
Related issues/PRs
Todos
Release Note
Reminder for the reviewer
Make sure that this PR has the correct labels and milestone set.
Every PR needs one
docs-*
label.docs-pr-required
: This change requires a change to the documentation that has not been completed yet.docs-completed
: This change has all necessary documentation completed.docs-not-required
: This change has no user-facing impact and requires no docs.Every PR needs one
release-note-*
label.release-note-required
: This PR has user-facing changes. Most PRs should have this label.release-note-not-required
: This PR has no user-facing changes.Other optional labels:
cherry-pick-candidate
: This PR should be cherry-picked to an earlier release. For bug fixes only.needs-operator-pr
: This PR is related to install and requires a corresponding change to the operator.