Hansi Flick has announced his intention to leave his role as Bayern Munich head coach at the end of the season