Check whether the action is a CSI action and whether CSI feature is

enabled, before executing the action.

The DeleteItemAction is not checked, because the DIA doesn't have a
method to get the action's plugin name.
This should be OK, because the CSI will check whether the VS and VSC
have a backup name annotation. If the VS and VSC is not handled by
the CSI plugin, then they don't have the annotation.

Signed-off-by: Xun Jiang <jxun@vmware.com>
This commit is contained in:
Xun Jiang
2023-10-17 20:57:11 +08:00
parent 5ff5073cc3
commit 908e2c63ba
8 changed files with 103 additions and 0 deletions

View File

@@ -119,6 +119,7 @@ func InvokeDeleteActions(ctx *Context) error {
if !action.Selector.Matches(labels.Set(obj.GetLabels())) {
continue
}
err = action.DeleteItemAction.Execute(&velero.DeleteItemActionExecuteInput{
Item: obj,
Backup: ctx.Backup,