Real Madrid have reached an agreement with goalkeeper Andriy Lunin over a new contract which will run until 2028, multiple sources have told ESPN.