This repository has been archived by the owner on Mar 4, 2024. It is now read-only.
EVEREST-838 Workaround waiting for DBs to be deleted #311
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Workaround waiting for DBs to be deleted
Problem:
EVEREST-838
When deleting a DBC CR, the everest operator doesn't wait for the DB operator's CRs to be deleted. Thus, as soon as we delete the DBC CRs, these cease to exist in the cluster and the polling below will return immediately. If we don't wait for the DB operators to process the deletion of the CRs, we may end up deleting the namespaces before the DB operators have a chance to delete the resources they manage, leaving the namespaces in an endless Terminating state waiting for finalizers to be removed.
The everest operator should have a Deleting status that waits for the DB operators to delete their DB CRs before removing the corresponting DBC CR. Until this is implemented, we work around this by sleeping for two minutes to give the DB operators a chance to delete the resources they manage before we delete the namespaces.
CHECKLIST
Jira
Tests
[ ] Is an Integration test/test case added for the new feature/change?[ ] Are unit tests added where appropriate?