Skip to content

Commit

Permalink
Fix OADP-5111: Backups partially fails when backing up all namespaces
Browse files Browse the repository at this point in the history
  • Loading branch information
shubham-pampattiwar committed Oct 24, 2024
1 parent 1f897ab commit c709f85
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions pkg/backup/backup.go
Original file line number Diff line number Diff line change
Expand Up @@ -739,6 +739,11 @@ func getNamespacesManagedByArgoCD(kbClient kbclient.Client, includedNamespaces [
for _, nsName := range includedNamespaces {
ns := corev1api.Namespace{}
if err := kbClient.Get(context.Background(), kbclient.ObjectKey{Name: nsName}, &ns); err != nil {
// check for only those ns that exist and are included in backup
// here we ignore cases like "" or "*" specified under includedNamespaces
if apierrors.IsNotFound(err) {
continue
}
log.WithError(err).Errorf("error getting namespace %s", nsName)
continue
}
Expand Down

0 comments on commit c709f85

Please sign in to comment.