vmware-tanzu-labs / educates-training-platform

A platform for hosting interactive workshop environments in Kubernetes, or on top of a local container runtime.
https://docs.educates.dev
Apache License 2.0
63 stars 14 forks source link

Implement a shutdown hook to clean up when session is destroyed #468

Open jorgemoralespou opened 1 week ago

jorgemoralespou commented 1 week ago

Is your feature request related to a problem? Please describe.

When you do things as part of your workshop setup in an imperative manner to some other infrastructure or even the same where educates is working it's difficult (or impossible) to guarantee a clean cleanup of the resources. e.g. in s script in setup.d you create a resource in an hyperscaler infrastructure, or you run terraform/ansible apply script. You want that, when the session is terminated, be able to destroy those resources, or run terraform/ansible destroy.

Describe the solution you'd like

It'd be nice to have a way to define shutdown hook that will be called upon session termination, so that an action can be executed.

Describe alternatives you've considered

No response

Additional information

No response