diff --git a/pkg/plugin/framework/backup_item_action_client.go b/pkg/plugin/framework/backup_item_action_client.go index 2a3f0a1d4..52b79a816 100644 --- a/pkg/plugin/framework/backup_item_action_client.go +++ b/pkg/plugin/framework/backup_item_action_client.go @@ -62,6 +62,10 @@ func (c *BackupItemActionGRPCClient) AppliesTo() (velero.ResourceSelector, error return velero.ResourceSelector{}, fromGRPCError(err) } + if res.ResourceSelector == nil { + return velero.ResourceSelector{}, nil + } + return velero.ResourceSelector{ IncludedNamespaces: res.ResourceSelector.IncludedNamespaces, ExcludedNamespaces: res.ResourceSelector.ExcludedNamespaces, diff --git a/pkg/plugin/framework/restore_item_action_client.go b/pkg/plugin/framework/restore_item_action_client.go index ef081c153..06622e26d 100644 --- a/pkg/plugin/framework/restore_item_action_client.go +++ b/pkg/plugin/framework/restore_item_action_client.go @@ -58,6 +58,10 @@ func (c *RestoreItemActionGRPCClient) AppliesTo() (velero.ResourceSelector, erro return velero.ResourceSelector{}, fromGRPCError(err) } + if res.ResourceSelector == nil { + return velero.ResourceSelector{}, nil + } + return velero.ResourceSelector{ IncludedNamespaces: res.ResourceSelector.IncludedNamespaces, ExcludedNamespaces: res.ResourceSelector.ExcludedNamespaces,