Skip to content

Commit

Permalink
EVEREST-1615: handle deleting state during uninstall (#842)
Browse files Browse the repository at this point in the history
  • Loading branch information
michal-kralik authored Nov 19, 2024
1 parent 2289f31 commit f1f1971
Showing 1 changed file with 0 additions and 9 deletions.
9 changes: 0 additions & 9 deletions pkg/uninstall/uninstall.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down

0 comments on commit f1f1971

Please sign in to comment.