Pep Guardiola has signed a two-year contract extension that will take his time with Manchester City to more than a decade.