mirror of
https://github.com/vmware-tanzu/velero.git
synced 2026-01-06 13:26:26 +00:00
Merge pull request #271 from nrb/fix-246
Invalidate restores based on non-existent backups
This commit is contained in:
@@ -297,6 +297,8 @@ func (controller *restoreController) getValidationErrors(itm *api.Restore) []str
|
||||
|
||||
if itm.Spec.BackupName == "" {
|
||||
validationErrors = append(validationErrors, "BackupName must be non-empty and correspond to the name of a backup in object storage.")
|
||||
} else if _, err := controller.fetchBackup(controller.bucket, itm.Spec.BackupName); err != nil {
|
||||
validationErrors = append(validationErrors, fmt.Sprintf("Error retrieving backup: %v", err))
|
||||
}
|
||||
|
||||
includedResources := sets.NewString(itm.Spec.IncludedResources...)
|
||||
|
||||
Reference in New Issue
Block a user