-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Description
Is your enhancement related to a problem? Please describe
We have some feature requests for adding the ability for DevWorkspaces to complete setup from a devfile automatically (e.g. #22491). This would involve the DevWorkspace patching itself to update its components, etc. to match a devfile within a cloned git repository.
However, this is currently difficult to do as DevWorkspaces set up via normal flows (e.g. the factory flow, etc.) are modified from the underlying devfile before being applied to the cluster.
Describe the solution you'd like
When creating a workspace from a devfile or repository with a devfile in it, we should implement conversion so that the contents of the original devfile are the same as the .spec.template field of the DevWorkspace, with any Che-specific settings (e.g. environment variables) added via container contributions. For example, in testing creation of a workspace from https://github.com/eclipse-che/che-dashboard/, I see the following environment variables added to each container:
- CHE_DASHBOARD_URL
- CHE_PLUGIN_REGISTRY_URL
- CHE_PLUGIN_REGISTRY_INTERNAL_URL
- CLUSTER_CONSOLE_URL
- CLUSTER_CONSOLE_TITLE
- OPENVSX_REGISTRY_URL
While these variables are necessary for running Che, they could be added to the main development container by including them in the injected editor (e.g. the Code DevWorkspaceTemplate)
Any cases where this isn't possible should be noted as requiring special handling or potential improvements in the DevWorkspace Operator.
Describe alternatives you've considered
No response
Additional context
Related: #22491