-
Notifications
You must be signed in to change notification settings - Fork 114
chore:add default dev container component #736
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A few importnant things to consider:
- if the devfile has the parent reference no default compoment should be injected, similar issue has been addressed on the user dashboard end - When a devfile references a parent we should not add the default component che#22103
- my understanding is that on the lib end we are going to hardcode
quay.io/devfile/universal-developer-image:latest
, however on CR level it is possible to define the default component which would be applied by the dashboard e.g.
devEnvironments:
defaultComponents:
- container:
image: 'quay.io/devfile/universal-developer-image:ubi8-38da5c2'
sourceMapping: /projects
name: universal-developer-image
I'm afraid that if we merge this PR, this functionality will be broken, the library will always inject the hardcoded default component
My understanding is that the feature with default component injection is going to be introduced for API tests usage. I would propose adding some flag on the lib end that would allow to opt-in for the default component injection that would emulate the UD behavior that will be used by API tests. On the UD end we will be using the lib without the flag and inject default component based on the CR property. @l0rd wdyt? |
I agree. It's important to allow specifying the default component image name. |
We can add The command to generate a DW will be like:
The default value will be |
@svor sounds good 👍 |
Yes and also adding a new flag |
If devfile doesn't provide any component and doesn't have parent, the generator can inject a default one with name 'dev' and image that could be defined Signed-off-by: Valerii Svydenko <vsvydenk@redhat.com>
a48ad9f
to
0f72cca
Compare
The codebase and the description were updated, it's ready for review |
What does this PR do?
This PR provides an ability to inject a default dev container component into the DevWorkspace. For this, two additional parameters were added:
--injectDefaultComponent:
inject a default dev container component if no component is defined in the devfile and it doesn't provide a parent, the value can be true or false, default is false--defaultComponentImage:
image to use for the dev container component that will be injected if injectDefaultComponent is true, default is quay.io/devfile/universal-developer-image:ubi8-latestThe resulted DevWorkspace
Screenshot/screencast of this PR
What issues does this PR fix or reference?
eclipse-che/che#22082
How to test this PR?
Try to generate a DevWorkspace using this devfile.yaml:
For this:
che-devfile-registry/tools/devworkspace-generator
by eecutingyarn
devfile
folder inche-devfile-registry/tools/devworkspace-generator
che-devfile-registry/tools/devworkspace-generator
folderThe resulted file is
Now you can create a workspace via
oc apply -f /tmp/all-in-one.yaml
PR Checklist
As the author of this Pull Request I made sure that:
What issues does this PR fix or reference
andHow to test this PR
completedReviewers
Reviewers, please comment how you tested the PR when approving it.