Former grand prix driver Kamui Kobayashi has joined Ferrari's factory World Endurance Championship campaign.