mirror of
https://github.com/vmware-tanzu/velero.git
synced 2026-01-07 05:46:37 +00:00
feat: Add install arg and config for concurrent backups
Co-authored-by: aider (gemini/gemini-2.5-pro) <aider@aider.chat> Signed-off-by: Scott Seago <sseago@redhat.com>
This commit is contained in:
@@ -59,6 +59,7 @@ type podTemplateConfig struct {
|
||||
repoMaintenanceJobConfigMap string
|
||||
nodeAgentConfigMap string
|
||||
itemBlockWorkerCount int
|
||||
concurrentBackups int
|
||||
forWindows bool
|
||||
kubeletRootDir string
|
||||
nodeAgentDisableHostPath bool
|
||||
@@ -224,6 +225,12 @@ func WithItemBlockWorkerCount(itemBlockWorkerCount int) podTemplateOption {
|
||||
}
|
||||
}
|
||||
|
||||
func WithConcurrentBackups(concurrentBackups int) podTemplateOption {
|
||||
return func(c *podTemplateConfig) {
|
||||
c.concurrentBackups = concurrentBackups
|
||||
}
|
||||
}
|
||||
|
||||
func WithPriorityClassName(priorityClassName string) podTemplateOption {
|
||||
return func(c *podTemplateConfig) {
|
||||
c.priorityClassName = priorityClassName
|
||||
@@ -337,6 +344,10 @@ func Deployment(namespace string, opts ...podTemplateOption) *appsv1api.Deployme
|
||||
args = append(args, fmt.Sprintf("--item-block-worker-count=%d", c.itemBlockWorkerCount))
|
||||
}
|
||||
|
||||
if c.concurrentBackups > 0 {
|
||||
args = append(args, fmt.Sprintf("--concurrent-backups=%d", c.concurrentBackups))
|
||||
}
|
||||
|
||||
deployment := &appsv1api.Deployment{
|
||||
ObjectMeta: objectMeta(namespace, "velero"),
|
||||
TypeMeta: metav1.TypeMeta{
|
||||
|
||||
@@ -271,6 +271,7 @@ type VeleroOptions struct {
|
||||
RepoMaintenanceJobConfigMap string
|
||||
NodeAgentConfigMap string
|
||||
ItemBlockWorkerCount int
|
||||
ConcurrentBackups int
|
||||
KubeletRootDir string
|
||||
NodeAgentDisableHostPath bool
|
||||
ServerPriorityClassName string
|
||||
@@ -362,6 +363,7 @@ func AllResources(o *VeleroOptions) *unstructured.UnstructuredList {
|
||||
WithPodResources(o.PodResources),
|
||||
WithKeepLatestMaintenanceJobs(o.KeepLatestMaintenanceJobs),
|
||||
WithItemBlockWorkerCount(o.ItemBlockWorkerCount),
|
||||
WithConcurrentBackups(o.ConcurrentBackups),
|
||||
}
|
||||
|
||||
if o.ServerPriorityClassName != "" {
|
||||
|
||||
Reference in New Issue
Block a user