http://www.theamericanconservative.com/a-cia-coup/

Fwiw, this is the Petraeus theory that I find most plausible. Factions within the CIA establishment wanted him gone. They see CIA as having lost its way, and Petraeus' directorship as the continued militarization of CIA.