You got to do what you got to do
you('ve) got to do what you('ve) got to do
Said of any task or obligation that one must undertake or go through with, especially when it is difficult, unpleasant, undesirable, inconvenient, etc. Now, I don't like resorting to violence, but you got to do what you got to do when it comes to protecting your property. A: "Sorry for missing practice, but I promised the neighbors I would feed their pets." B: "No worries—you've got to do what you've got to do."
Farlex Dictionary of Idioms. © 2015 Farlex, Inc, all rights reserved.
You got to do what you got to do.and A man's gotta do what a man's gotta do.
One has to do whatever it is that one feels obliged to do. I know I wouldn't ever agree to that kind of thing, but you got to do what you got to do.
McGraw-Hill Dictionary of American Idioms and Phrasal Verbs. © 2002 by The McGraw-Hill Companies, Inc.