Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dashboard should put plugins in DevWorkspace .spec.contributions instead of as plugin components in .spec.templates #21737

Closed
amisevsk opened this issue Sep 29, 2022 · 0 comments · Fixed by eclipse-che/che-dashboard#672
Assignees
Labels
area/dashboard kind/enhancement A feature request - must adhere to the feature request template. severity/P1 Has a major impact to usage or development of the system.

Comments

@amisevsk
Copy link
Contributor

Is your enhancement related to a problem? Please describe

Once devfile/devworkspace-operator#939 is merged, DevWorkspaces will support a new field .spec.contributions. This functions like plugin components in .spec.template.components but allows for plugins to be defined separately from the rest of the devfile, and hopefully makes provisioning workspaces simpler.

When injecting editors/other components into a workspace, the dashboard should instead use the contributions field:

 apiVersion: workspace.devfile.io/v1alpha2
 kind: DevWorkspace
 metadata:
   name: golang-example
   namespace: <username>-che
 spec:
   routingClass: che
   started: false
   contributions:
+    - name: theia
+      kubernetes:
+        name: che-code-workspace1cfc13df8bcf497a
+        namespace: <username>-che
   template:
     components:
       - name: tools
         container:
           image: udi8
           # etc
-      - name: theia
-        plugin:
-          kubernetes:
-            name: che-code-workspace1cfc13df8bcf497a
-            namespace: <username>-che

Note that the structure of the component being added is slightly different, with the plugin field being removed (since all items in .spec.contributions are treated as plugins)

Note: to avoid an issue where dashboard uses this field before it is available in DevWorkspaces, this issue should not be implemented until DWO ships these changes. Otherwise we risk running into an issue like #21729

Describe the solution you'd like

Adopt the .spec.contributions field for specifying editors and additional components not present in the original Devfile. This has the additional benefit of making conversion from Devfile -> DevWorkspace simpler, as the basic structure is

kind: DevWorkspace
apiVersion: workspace.devfile.io/v1alpha2
metadata:
  name: <devfile.name>
spec:
  started: true
  routingClass: che
  template:
    # components, commands, events, attributes from original devfile, unchanged
    # if setting additional attributes (e.g. storage-type), inject into attributes
    # as is done currently
    <devfile>
  contributions:
    <editors, default plugins>

Describe alternatives you've considered

No response

Additional context

This issue is part of #21736

@amisevsk amisevsk added the kind/enhancement A feature request - must adhere to the feature request template. label Sep 29, 2022
@che-bot che-bot added the status/need-triage An issue that needs to be prioritized by the curator responsible for the triage. See https://github. label Sep 29, 2022
@amisevsk amisevsk added severity/P1 Has a major impact to usage or development of the system. and removed status/need-triage An issue that needs to be prioritized by the curator responsible for the triage. See https://github. labels Sep 30, 2022
@ibuziuk ibuziuk mentioned this issue Oct 11, 2022
67 tasks
@ibuziuk ibuziuk mentioned this issue Nov 2, 2022
73 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/dashboard kind/enhancement A feature request - must adhere to the feature request template. severity/P1 Has a major impact to usage or development of the system.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants