-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Get updated cluster before removing finalizers (#1173)
If the cluster actuator's Delete() call updates the cluster in the apiserver, there is a possibility that in-memory cluster object in the cluster controller is now out of date. We either need to get-then-update the cluster to remove the finalizer, or we need to use patch. The version of controller-runtime we're using in release-0.1 does not support patch in its generic client, so this change adds the get-then-update logic, and wraps it inside a retry on conflict loop. Signed-off-by: Andy Goldstein <goldsteina@vmware.com>
- Loading branch information
1 parent
365b683
commit 9418040
Showing
2 changed files
with
23 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters