-
Notifications
You must be signed in to change notification settings - Fork 91
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
On a downgrade from 4.6 to 4.5 scenario, the leader election ConfigMap is created by CSO 4.6 (library-go) and it doesn't have any `ownerReference` set. However, CSO 4.5 uses `operator-sdk` with leader-for-life election approach, and it expects that the ConfigMap either doesn't exist or exists but has an `ownerReference` set (in order to know whether the lock belongs to it or not). Since it doesn't find any, it tries to create one, but it gets back an error stating the the object already exists. This goes on forever and CSO 4.5 never become the leader. This patch identifies if the lock was created by CSO 4.6 and, if so, deletes it so that CSO 4.5 can become the leader using the leader-for-life model
- Loading branch information
1 parent
52cc7bf
commit 2d1e41a
Showing
1 changed file
with
63 additions
and
4 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