Not sure why the confusion of Kakashi being a traitor is around...



In this picture, the enemy clearly states that Kakashi messed up their hard work, so if anything Kakashi had no real choice in the situation except for killing her to make sure his mission wasn't failed and that Konoha remains safe, which explains his tears while killing her. He's still a good guy, but was forced to do it, very similar to Nagato and Yahiko, just a different scenario.