From f1f1971f5c395c5d4a5e2ea674e5dc8d6e78a286 Mon Sep 17 00:00:00 2001 From: Michal Kralik Date: Tue, 19 Nov 2024 18:01:42 +0100 Subject: [PATCH] EVEREST-1615: handle deleting state during uninstall (#842) --- pkg/uninstall/uninstall.go | 9 --------- 1 file changed, 9 deletions(-) diff --git a/pkg/uninstall/uninstall.go b/pkg/uninstall/uninstall.go index 26b3ad4dd..92586f6b0 100644 --- a/pkg/uninstall/uninstall.go +++ b/pkg/uninstall/uninstall.go @@ -334,15 +334,6 @@ func (u *Uninstall) deleteDBs(ctx context.Context) error { for _, db := range dbs.Items { u.numResourcesDeleted++ u.l.Infof("Deleting database cluster '%s' in namespace '%s'", db.Name, ns) - // Delete in foreground. - if !db.GetDeletionTimestamp().IsZero() { - finalizers := db.GetFinalizers() - finalizers = append(finalizers, common.ForegroundDeletionFinalizer) - db.SetFinalizers(finalizers) - if err := u.kubeClient.PatchDatabaseCluster(&db); err != nil { - return errors.Join(errors.New("failed to add foregroundDeletion finalizer"), err) - } - } if err := u.kubeClient.DeleteDatabaseCluster(ctx, ns, db.Name); err != nil { return err }