-
Notifications
You must be signed in to change notification settings - Fork 67
Description
Description
Let's take the example of one simple devfile with one container
schemaVersion: 2.1.0
metadata:
name: example
components:
- name: tools
container:
image: registry.access.redhat.com/ubi8/ubi-minimalToday, to start an editor in this container, Che Dashboard through some external libs is patching entrypoint of the component.
It leads to many problems:
- logic is inside dashboard side (or 3rd party library)
- devfile is changed so when looking at the result it's hard to know what devfile was used as input.
- entrypoint is changed
- we can't use the editor without dashboard
...but I would like to have a cleaner solution where:
- devfile is kept untouched
- entrypoint is not overriden
- it can work on top of DevWorkspaceController without any che-related stuff
So I would like to be able to define a postStart event to run a command ... but this command should be invoked in another container. (Like the first container or another one depending on one possible annotation)
TL;DR:
Add a postStart event inside the DevWorkspaceTemplate telling to execute one command in another container (but not knowing its name as the 'editor' template doesn't know much about the name of the components/containers of the devfile)
Additional context
It would depend on #628
DevWorkspaceTemplate would then:
- notify to mount a given path in first container (or all)
- notify to execute a command inside the container