From e205e2122d6c045231d76e63556fc3b6e55234e2 Mon Sep 17 00:00:00 2001 From: Xun Jiang Date: Fri, 16 Jun 2023 17:37:10 +0800 Subject: [PATCH] Retrieve DataUpload into backup result ConfigMap during volume snapshot restore. Fix issue #6117. Add CSI plugin needs builder functions. Signed-off-by: Xun Jiang --- pkg/builder/data_download_builder.go | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/pkg/builder/data_download_builder.go b/pkg/builder/data_download_builder.go index 5ba726cf2..c564c80cf 100644 --- a/pkg/builder/data_download_builder.go +++ b/pkg/builder/data_download_builder.go @@ -5,10 +5,8 @@ Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at - http://www.apache.org/licenses/LICENSE-2.0 - Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -24,7 +22,6 @@ import ( velerov2alpha1api "github.com/vmware-tanzu/velero/pkg/apis/velero/v2alpha1" ) - // DataDownloadBuilder builds DataDownload objects. type DataDownloadBuilder struct { object *velerov2alpha1api.DataDownload @@ -106,10 +103,10 @@ func (d *DataDownloadBuilder) DataMoverConfig(config *map[string]string) *DataDo } // ObjectMeta applies functional options to the DataDownload's ObjectMeta. -func (b *DataDownloadBuilder) ObjectMeta(opts ...ObjectMetaOpt) *DataDownloadBuilder { +func (d *DataDownloadBuilder) ObjectMeta(opts ...ObjectMetaOpt) *DataDownloadBuilder { for _, opt := range opts { - opt(b.object) + opt(d.object) } - return b + return d }