Options

 

Activity monitor

Regardless of the method, will need some component that can run, monitor activity and, if appropriate, initiate shutdown. This will likely run in the API server pod to have direct access to the API.