mirror of
https://github.com/vmware-tanzu/velero.git
synced 2026-09-20 15:04:17 +00:00
Delete moved snapshots when the backup is deleted
This commit introduces a deleteItemAction which writes a temporary configmap to record the snapshot info so that the controller can trigger repo manager to remove the snapshot This process is a bit chatty and we should consider to refactor the code so it's easier to connect to the repo directly in the DIA Signed-off-by: Daniel Jiang <jiangd@vmware.com>
This commit is contained in:
@@ -53,10 +53,10 @@ import (
|
||||
"github.com/vmware-tanzu/velero/pkg/util/kube"
|
||||
)
|
||||
|
||||
const dataMoverType string = "velero"
|
||||
const dataUploadDownloadRequestor string = "snapshot-data-upload-download"
|
||||
|
||||
const preparingMonitorFrequency time.Duration = time.Minute
|
||||
const (
|
||||
dataUploadDownloadRequestor string = "snapshot-data-upload-download"
|
||||
preparingMonitorFrequency time.Duration = time.Minute
|
||||
)
|
||||
|
||||
// DataUploadReconciler reconciles a DataUpload object
|
||||
type DataUploadReconciler struct {
|
||||
@@ -116,7 +116,7 @@ func (r *DataUploadReconciler) Reconcile(ctx context.Context, req ctrl.Request)
|
||||
return ctrl.Result{}, errors.Wrap(err, "getting DataUpload")
|
||||
}
|
||||
|
||||
if du.Spec.DataMover != "" && du.Spec.DataMover != dataMoverType {
|
||||
if !datamover.IsBuiltInUploader(du.Spec.DataMover) {
|
||||
log.WithField("Data mover", du.Spec.DataMover).Debug("it is not one built-in data mover which is not supported by Velero")
|
||||
return ctrl.Result{}, nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user