-
Notifications
You must be signed in to change notification settings - Fork 103
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
Cleanup finalizer removal in instance update #1389
Conversation
Signed-off-by: Andreas Neumann <aneumann@mesosphere.com>
@@ -271,7 +271,11 @@ func updateInstance(instance *kudov1beta1.Instance, oldInstance *kudov1beta1.Ins | |||
|
|||
// 1. check if the finalizer can be removed (if the instance is being deleted and cleanup is completed) and then | |||
// update instance spec and metadata. this will not update Instance.Status field | |||
isDelete := tryRemoveFinalizer(instance) | |||
isDeletionComplete := false |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Still misleading IMHO, because the DELETE is complete when the Instance is removed, which is not the case here. We could call it what it is: isFinalizerRemoved
(1) or what it means to us: isCleanupDone
(2). I'd prefer the first one.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually, the result from tryRemoveFinalizer is not important for us, that could also happend on an upgrade if the cleanup plan is removed. I've pushed another version...
Signed-off-by: Andreas Neumann <aneumann@mesosphere.com>
Signed-off-by: Ken Sipe <kensipe@gmail.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/lgtm
Co-authored-by: Ken Sipe <kensipe@gmail.com> Signed-off-by: Andreas Neumann <aneumann@mesosphere.com> Signed-off-by: Thomas Runyon <runyontr@gmail.com>
Only try to remove finalizers if we're actually in the deletion process
Signed-off-by: Andreas Neumann aneumann@mesosphere.com