
Kill the goose that lays the golden egg/eggs
Aesop's Fable
The phrase originates from a fable by Aesop about a farmer who sacrificed long-term benefits for short-term gains. 
Idiomatic caution
Used to caution against actions that could ruin something that’s consistently beneficial. 
Metaphoric value
This metaphor is often applied to financial and business situations, but can also relate to personal relationships. 