Skip to content

🐛 properly handle deletion of IPAddressClaims in ipamutil.ClaimReconciler #329

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

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

llxp
Copy link
Contributor

@llxp llxp commented Mar 28, 2025

What this PR does / why we need it:
This PR is based on the changes from @schrej and fixes a bug, where ReleaseAddress is not getting called during deletion.
Additionally it fixes an error regarding to error handling:
err := errors.New("pool not found")
This hides the error of FetchPool(). Instead it should be wrapped/enhanced by the new error.
And changes some behaviour regarding the finalizer patching. The defer is moved down and the finalizer patching is now done explicitly instead of implicitly by the defer.

@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Mar 28, 2025
@k8s-ci-robot k8s-ci-robot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Mar 28, 2025
Copy link
Member

@mcbenjemaa mcbenjemaa left a comment

Choose a reason for hiding this comment

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

Duplicated #324

/hold

@k8s-ci-robot k8s-ci-robot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Mar 28, 2025
@schrej schrej changed the title 🐛 fixing a bug 🐛 properly handle deletion of IPAddressClaims in ipamutil.Reconciler Mar 28, 2025
@schrej schrej requested review from schrej and removed request for srm09 March 28, 2025 13:33
@schrej
Copy link
Member

schrej commented Mar 28, 2025

I've closed the duplicate, but will keep the hold for further internal testing in conjunction with our Infoblox provider.

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please ask for approval from schrej. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@schrej schrej changed the title 🐛 properly handle deletion of IPAddressClaims in ipamutil.Reconciler 🐛 properly handle deletion of IPAddressClaims in ipamutil.ClaimReconciler Mar 28, 2025
@llxp llxp force-pushed the fix/reconcile-delete branch from d15f570 to 3e32453 Compare April 17, 2025 14:36
schrej and others added 2 commits April 17, 2025 16:42
There were two cases where deletion of a claim was reconciled without calling ClaimHandler.ReleaseAddress, which causes issues for providers that manage addresses in external systems.
@schrej schrej force-pushed the fix/reconcile-delete branch from 3e32453 to fa644f4 Compare April 17, 2025 14:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants