Add `ParallelFilesUpload` for schedule creation.

Modify restore-helper print information.

Signed-off-by: Xun Jiang <blackpigletbruce@gmail.com>
pull/7370/head
Xun Jiang 2024-01-30 22:28:59 +08:00
parent 1034d6aee0
commit 7aaf62442a
2 changed files with 8 additions and 2 deletions

View File

@ -66,10 +66,10 @@ func done() bool {
doneFile := filepath.Join("/restores", child.Name(), ".velero", os.Args[1])
if _, err := os.Stat(doneFile); os.IsNotExist(err) {
fmt.Printf("Not found: %s\n", doneFile)
fmt.Printf("The filesystem restore done file %s is not found yet. Retry later.\n", doneFile)
return false
} else if err != nil {
fmt.Fprintf(os.Stderr, "ERROR looking for %s: %s\n", doneFile, err)
fmt.Fprintf(os.Stderr, "ERROR looking filesystem restore done file %s: %s\n", doneFile, err)
return false
}

View File

@ -171,6 +171,12 @@ func (o *CreateOptions) Run(c *cobra.Command, f client.Factory) error {
schedule.Spec.Template.ResourcePolicy = &v1.TypedLocalObjectReference{Kind: resourcepolicies.ConfigmapRefType, Name: o.BackupOptions.ResPoliciesConfigmap}
}
if o.BackupOptions.ParallelFilesUpload > 0 {
schedule.Spec.Template.UploaderConfig = &api.UploaderConfigForBackup{
ParallelFilesUpload: o.BackupOptions.ParallelFilesUpload,
}
}
if printed, err := output.PrintWithFormat(c, schedule); printed || err != nil {
return err
}