Well, it’s only right. Clearly he was terrible at keeping secrets.
"Yesterday afternoon, I went to the White House and asked the President to be allowed, for personal reasons, to resign from my position," Petraeus said in his resignation letter. "After being married for over 37 years, I showed extremely poor judgment by engaging in an extramarital affair. Such behavior is unacceptable, both as a husband and as the leader of an organization such as ours."
"This afternoon, the President graciously accepted my resignation," Petraeus said in the letter.