A county and a city within the county may enter into an agreement to provide administrative services through the county sheriff to the city for its police department. In addition to other provisions required by this chapter, the agreement shall specify the administrative services to be provided by the sheriff and the administrative or supervisory relationship between the sheriff and the mayor and city council. The agreement is subject to the approval of the county sheriff. The sheriff may accept compensation for the administrative services provided to the city, which compensation is in addition to the sheriff’s compensation authorized under section 331.907. The additional compensation shall not be included in computing the total annual compensation of the sheriff pursuant to section 331.904, subsection 2.