Allegri will sign Milan extension