Pep Guardiola has agreed a two-year contract extension committing himself to City until 2025.