The Israeli military command, and especially the intelligence agencies, were part of the anti-Netanyahu coalition. The real problem in Israel is a sort of caste warfare, somewhat similar to the US, though the components are different.
In Israel it is the Mizrahi (Near Eastern Jews), Sefardi and Orthodox/Haredi vs the Ashkenazi (European Jews) that dominate the institutions. Netanyahu represents the low end of that split.
It is fortunate that Maj. Gen. Halevi was not working for Russia. Instead of a Defenestration of Prague, they sometimes perform a Defenestration of Pskov.