The United States military takes adultery very seriously. In fact it treats adultery as a criminal offence warranting imprisonment.
When CIA director David Petraeus resigned, he pointedly stated that his affair with his biographer, Paula Broadwell, began after he left the U.S. Army.
Under no circumstances did the affair occur while Petraeus was still an active duty general. Certainly not during the time Petraeus and Broadwell spent together in Afghanistan. And not during the time she spent with him working on his biography.
This isn't over yet, not by a long shot.