-
Notifications
You must be signed in to change notification settings - Fork 107
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
Fix: uninstallation for operator #796
Fix: uninstallation for operator #796
Conversation
this list of steps looks to me like they could have been automated in a test? |
unless i am wrong, we have cfgMapDeletionTestSuite() which does this test |
546a8d8
to
97ce1ce
Compare
b8e73a0
to
c048880
Compare
bundle/manifests/datasciencecluster.opendatahub.io_datascienceclusters.yaml
Outdated
Show resolved
Hide resolved
- when CM exist and DSC CR exists Signed-off-by: Wen Zhou <wenzhou@redhat.com>
- add logic to remove subscription - do not call backup in DSCI during uninstallation - add permisison of delete subscripton - change function SubscriptionExists() return sub Signed-off-by: Wen Zhou <wenzhou@redhat.com>
Signed-off-by: Wen Zhou <wenzhou@redhat.com>
uninstall Signed-off-by: Wen Zhou <wenzhou@redhat.com>
Signed-off-by: Wen Zhou <wenzhou@redhat.com>
Signed-off-by: Wen Zhou <wenzhou@redhat.com>
Signed-off-by: Wen Zhou <wenzhou@redhat.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
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: VaishnaviHire The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
// If DSC CR exist and deletion CM exist | ||
// delete DSC CR and let reconcile requeue | ||
// sometimes with finalzier DSC CR wont get deleted, force to remove finalizer here | ||
if upgrade.HasDeleteConfigMap(r.Client) { |
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.
Maybe this deserves its own func
with a descriptive name which would self-explain the step which is going to be taken?
The reconciliation func body is becoming lengthy and it's getting a bit challenging to quickly skim trough the code to get understanding of the overall flow.
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.
I wonder however, wouldn't it be better to have a controller watching for the existence of this exact config map instead of checking for every DSCI reconcile? If exists -> delete DSCI which will trigger DSCI reconcile reacting on delete event.
@@ -63,7 +63,7 @@ var ( | |||
) | |||
|
|||
const ( | |||
timeout = 20 * time.Second | |||
timeout = 30 * time.Second // change this from original 20 to 30 because we often failed in post cleanup job |
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.
maybe move this to the commit message instead?
* Fix: add back logic to deal with uninstallation - when CM exist and DSC CR exists Signed-off-by: Wen Zhou <wenzhou@redhat.com> * update: cleanup finalzlier * fix Signed-off-by: Wen Zhou <wenzhou@redhat.com> * update: uninstallation process - add logic to remove subscription - do not call backup in DSCI during uninstallation - add permisison of delete subscripton - change function SubscriptionExists() return sub Signed-off-by: Wen Zhou <wenzhou@redhat.com> * update: add deletion for DS project as well during uninstallation Signed-off-by: Wen Zhou <wenzhou@redhat.com> * update: add calls of component.Cleanup() esp for kserve for now for uninstall Signed-off-by: Wen Zhou <wenzhou@redhat.com> * revert: deletion ds project during uninstall Signed-off-by: Wen Zhou <wenzhou@redhat.com> * fix: extend timeout in unit-test till we update testcase Signed-off-by: Wen Zhou <wenzhou@redhat.com> * cleanup: remove commented block Signed-off-by: Wen Zhou <wenzhou@redhat.com> --------- Signed-off-by: Wen Zhou <wenzhou@redhat.com>
* Fix: add back logic to deal with uninstallation - when CM exist and DSC CR exists Signed-off-by: Wen Zhou <wenzhou@redhat.com> * update: cleanup finalzlier * fix Signed-off-by: Wen Zhou <wenzhou@redhat.com> * update: uninstallation process - add logic to remove subscription - do not call backup in DSCI during uninstallation - add permisison of delete subscripton - change function SubscriptionExists() return sub Signed-off-by: Wen Zhou <wenzhou@redhat.com> * update: add deletion for DS project as well during uninstallation Signed-off-by: Wen Zhou <wenzhou@redhat.com> * update: add calls of component.Cleanup() esp for kserve for now for uninstall Signed-off-by: Wen Zhou <wenzhou@redhat.com> * revert: deletion ds project during uninstall Signed-off-by: Wen Zhou <wenzhou@redhat.com> * fix: extend timeout in unit-test till we update testcase Signed-off-by: Wen Zhou <wenzhou@redhat.com> * cleanup: remove commented block Signed-off-by: Wen Zhou <wenzhou@redhat.com> --------- Signed-off-by: Wen Zhou <wenzhou@redhat.com> (cherry picked from commit 9227687)
ref:
Description
How Has This Been Tested?
live build: quay.io/wenzhou/opendatahub-operator-catalog:v2.6.4-499
test I:
test II:
Merge criteria: