Skip to content

Commit afbb4b3

Browse files
sivakumar subraanisiva-portworx
authored andcommitted
pb-3554: Modified the status message if zero namespace is selected for namespace selector.
1 parent b147963 commit afbb4b3

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

pkg/applicationmanager/controllers/applicationbackup.go

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1637,7 +1637,11 @@ func (a *ApplicationBackupController) backupResources(
16371637
backup.Status.Stage = stork_api.ApplicationBackupStageFinal
16381638
backup.Status.FinishTimestamp = metav1.Now()
16391639
backup.Status.Status = stork_api.ApplicationBackupStatusSuccessful
1640-
backup.Status.Reason = "Volumes and resources were backed up successfully"
1640+
if len(backup.Spec.NamespaceSelector) != 0 && len(backup.Spec.Namespaces) == 0 {
1641+
backup.Status.Reason = "Namespace label selector did not find any namespaces with selected labels for backup"
1642+
} else {
1643+
backup.Status.Reason = "Volumes and resources were backed up successfully"
1644+
}
16411645

16421646
// Only on success compute the total backup size
16431647
for _, vInfo := range backup.Status.Volumes {

0 commit comments

Comments
 (0)