That’s the last straw:
noun: the final act or insult; the act that finally calls for a response.
the last i.e. final in a series of unpleasant events that finally makes you feel that you cannot continue to accept a bad situation anymore.
If a camel has been loaded with a lot of luggage and you still keep loading, at some point one more straw will break the back of camel.
That was the last straw when he came to office late for the 3rd consecutive day and got fired.