Merge pull request #7370 from blackpiglet/add_uploader_config_for_schedule

Add `ParallelFilesUpload` for schedule creation.
This commit is contained in:
Xun Jiang/Bruce Jiang
2024-01-31 11:22:17 +08:00
committed by GitHub
2 changed files with 8 additions and 2 deletions

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
}