-
Notifications
You must be signed in to change notification settings - Fork 33
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
The webhook should reject IPPool deletion if any IP has been allocated #135
Comments
I am not sure tbh if we want to have logic for ippool webhook deletion.. reconcileDelete() does check for the allocations already ip-address-manager/controllers/ippool_controller.go Lines 156 to 171 in 31c03f1
/cc @schrej if you have other opinions. |
Well, there are only two options (so far) on how to handle deletion: finalizers and webhooks. Finalizers are the safe way, as they prevent deletion on the apiserver and even work when the webhook isn't deployed. Either solution, or even a combination of both, is fine. Personally I'd probably prefer the combined approach, as you don't end up with deleted pools that remain in use for a long time that way. |
As you can't un-delete a resource in K8s, the webhook approach can prevent IPPool from going into Deleting state when it's in used. In case it's deleted unintentionally. |
Right now, the deletion is accepted, but we wait until all addresses are released before actually deleting. |
Hi @furkatgofurov7 got your point. When the user got error message that "IPPool is in used so can not be deleted", would he/she release the used IPs in this pool first then delete this pool again? |
Yup, that is how it is now when the delete is issued in the objects |
But we are also fine also to have |
Thanks @furkatgofurov7. Could you help proceed #137 ? It's ready for review and CI passed. |
/triage accepted |
1 similar comment
/triage accepted |
triage/accepted |
@jessehu: This issue is currently awaiting triage. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
/triage accepted |
prow is bit slow for requests but eventually should be able to label this. Otherwise I will do it manually. |
/triage accepted |
Issues go stale after 90d of inactivity. If this issue is safe to close now please do so with /lifecycle stale |
/remove-lifecycle stale |
What is the status of this @furkatgofurov7 ? |
#137 referring as a fix to this, but that seems to have some issues passing the CI? |
Issues go stale after 90d of inactivity. If this issue is safe to close now please do so with /lifecycle stale |
/remove-lifecycle stale |
Issues go stale after 90d of inactivity. If this issue is safe to close now please do so with /lifecycle stale |
This is something that would be welcomed but looks like progress has stalled |
What steps did you take and what happened:
[A clear and concise description on how to REPRODUCE the bug.]
What did you expect to happen:
Anything else you would like to add:
Looks like it doesn't handle the delete request: https://github.com/metal3-io/ip-address-manager/blob/main/api/v1alpha1/ippool_webhook.go#L137
Environment:
kubectl version
):/kind bug
The text was updated successfully, but these errors were encountered: