He put up a sign that said "if you tap on the glass, we will look up your address from your ticket purchase, and then I will personally come to your house and kill you in your sleep." This would of course make people not tap on the glass and have the required effect of him losing his job.
There might be some more boring, less creative answers as well. Switching out the shark tank from glass to plastic would prevent anyone from tapping on "the glass" and could quite feasibly cause him to lose his job, especially if the plastic was opaque. Killing the shark would get him fired, and there would no longer be a "shark tank" for people to tap on, it would just be an empty tank. There's probably an even more boring and obvious solution out there. Can you find it?