Workspace Cleanup Script

Is it possible to have a script in the gitpod.yml that will run a cleanup script when a a workspace times out? The use case here is that I want to spin up a new kubernetes namespace on workspace start (command:), but then delete that namespace when I’m done.

I have also wanted something to run on workspace stop. I cannot remember what it was that I wanted to do. However, an init/start/stop set of handlers in .gitopod.yml might make a lot of sense. (Replace command with start.)

Regards,
Mark