For our project we are dynamically creating k8s deployments other than the ones in the workspace.
We are trying to provide following features for our dynamic deployments,
The provisioning of these deployments will happen via kubectl/helm in the same namespace.
Wondering if there is a way to edit the workspace runtime config with these new resources info?
Or Is there a better way to achieve this?
Usecase : The project in our workspace is a web project. When the developer wants to test it on the server runtime he issues an command which will dynamically create an deployment. The deployment has a server contianer(eg: tomcat) running the app built from project.
@vgopalakPrgs Hi, the described use case makes sense for me but unfortunately, there is no such an ability in Che.
@l0rd @slemeur WDYT? Maybe we can consider implementing this enhancement?
Yes that's an important use case.
@vgopalakPrgs : Is that something you would be interested to work on with @sleshchenko ?
Yes @slemeur I am interested to work on this feature. @sleshchenko Please do let me know how can I contribute.
As a bare minimum, we want to delete dynamic deployments on Workspace stop. Is there any Messaging/Event service that we can listen for Workspace Stop events?
@vgopalakPrgs Che Server deletes all deployments/pods with label che.workspace_id with value that current workspace id https://github.com/eclipse/che/blob/cf1fb2f328a9867ba88f342f94a30c245cc12986/infrastructures/kubernetes/src/main/java/org/eclipse/che/workspace/infrastructure/kubernetes/namespace/KubernetesDeployments.java#L683
If you able to label deployments/pods with this label then Che Server will clean up dynamic deployments itself. WDYT?
That's wonderful @vgopalakPrgs ! Thanks for your proposition.
I would recommend you to connect with @sleshchenko on Eclipse Che mattermost channel. You'll be able to discuss more directly - which will make it easier to work together ;)
You can join from this link: https://mattermost.eclipse.org/eclipse/channels/eclipse-che
Ideally if you could discuss to define the scope and the necessary work that would be great. And once you are ready, you could follow-up in this issue with your plan.
@sleshchenko Adding CHE_WORKSPACE_ID_LABEL worked splendidly. Che is removing the resources I create on workspace stop. Thanks for the swift reply.
Issues go stale after 180 days of inactivity. lifecycle/stale issues rot after an additional 7 days of inactivity and eventually close.
Mark the issue as fresh with /remove-lifecycle stale in a new comment.
If this issue is safe to close now please do so.
Moderators: Add lifecycle/frozen label to avoid stale mode.
Most helpful comment
@sleshchenko Adding CHE_WORKSPACE_ID_LABEL worked splendidly. Che is removing the resources I create on workspace stop. Thanks for the swift reply.