Skip to content

Commit

Permalink
fix(uninstall): system backup CRs not deleted
Browse files Browse the repository at this point in the history
ref: 6185

Signed-off-by: Chin-Ya Huang <chin-ya.huang@suse.com>
  • Loading branch information
c3y1huang authored and David Ko committed Jun 26, 2023
1 parent deb1802 commit 0fd8549
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions controller/uninstall_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -441,6 +441,13 @@ func (c *UninstallController) deleteCRDs() (bool, error) {
return true, nil
}

// Waits the SystemBackup CRs be clean up by backup_target_controller
if systemBackups, err := c.ds.ListSystemBackups(); err != nil {
return true, err
} else if len(systemBackups) > 0 {
return true, fmt.Errorf("found %d SystemBackups remaining", len(systemBackups))
}

// Delete the BackupTarget CRs
if backupTargets, err := c.ds.ListBackupTargets(); err != nil {
return true, err
Expand Down

0 comments on commit 0fd8549

Please sign in to comment.