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

Updates to the Devfile 2 model to support Che workspaces #18878

Closed
3 tasks done
l0rd opened this issue Jan 25, 2021 · 7 comments
Closed
3 tasks done

Updates to the Devfile 2 model to support Che workspaces #18878

l0rd opened this issue Jan 25, 2021 · 7 comments
Labels
area/devfile-spec Issues related to Devfile v2 engine/devworkspace Issues related to Che configured to use the devworkspace controller as workspace engine. kind/enhancement A feature request - must adhere to the feature request template. kind/epic A long-lived, PM-driven feature request. Must include a checklist of items that must be completed. severity/P1 Has a major impact to usage or development of the system.

Comments

@l0rd
Copy link
Contributor

l0rd commented Jan 25, 2021

Is your enhancement related to a problem? Please describe.

There are some features of workspaces that could be specified using a Devfile v1 that it's not possible to specify using Devfile v2 yet.

Describe the solution you'd like

spec:
  components:
    - name: my-ephemeral-volume 
      volume:
        ephemeral: false # Volume my-ephemeral-volume will be mounted as emptyDir
  • asynchronous storage controller team
  • Support secret and configmap injection (to review if we want to support current injection mechanism) controller team
    ^
    we don't need to have it on devfile model, we're going to implement it in the same way as currently Che does, match secrets and configmaps with their labels/annotations.
@l0rd l0rd added the kind/enhancement A feature request - must adhere to the feature request template. label Jan 25, 2021
@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 Jan 25, 2021
@l0rd l0rd added engine/devworkspace Issues related to Che configured to use the devworkspace controller as workspace engine. area/devfile-spec Issues related to Devfile v2 kind/epic A long-lived, PM-driven feature request. Must include a checklist of items that must be completed. 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 Jan 25, 2021
@l0rd l0rd added this to the DevWorkspace Integration - STEP1 milestone Jan 25, 2021
@sleshchenko
Copy link
Member

This issue is just about model changes and it can be closed I believe.
@amisevsk Could you please provide what is the devfile settings for async storage? Is it going to be the same as we used to have on devfile v1 level to switch all persisted volumes to async

attributes:
  ephemeral: true
  async: true

?

@amisevsk
Copy link
Contributor

amisevsk commented Mar 1, 2021

The current attributes are confusing, since we initially had ephemeral: true and so had to add async: true on top to keep backward compatibility. Starting over, I think the (probably label, not attribute) should be something like storageType: [common|ephemeral|async], with common being default if undefined.

@l0rd
Copy link
Contributor Author

l0rd commented Mar 2, 2021

The current attributes are confusing, since we initially had ephemeral: true and so had to add async: true on top to keep backward compatibility. Starting over, I think the (probably label, not attribute) should be something like storageType: [common|ephemeral|async], with common being default if undefined.

@amisevsk it makes sense. When you say "label, not attribute" you are thinking of to the DevWorkspace metatdata.labels?

@amisevsk
Copy link
Contributor

amisevsk commented Mar 2, 2021

When you say "label, not attribute" you are thinking of to the DevWorkspace metatdata.labels?

Yes, for now at least. We may revisit this once devfile/api#352 is merged, since that would add top-level attributes to DevWorkspaces.

@l0rd
Copy link
Contributor Author

l0rd commented Mar 2, 2021

@amisevsk we just added ephemeral: [true|false] as a field of volumes in the devfile spec. Shouldn't we replace that with storageType: [common|ephemeral|async]?

@amisevsk
Copy link
Contributor

amisevsk commented Mar 3, 2021

@l0rd No, I don't think so. I view the ephemeral field on volumes as serving a separate purpose -- it allows you to share data between containers without requiring persistent storage. The idea would be to have the overall workspace have [common|ephemeral|async] storage, but you can mark individual volumes in the devfile as ephemeral if you just want shared disk between images (a great example of this is the remote runtimes volume, which we want to be ephemeral even in an async/common workspace).

Having a per-volume setting for storageType becomes very tricky, as there could be conflicts (e.g. one volume uses common and one uses async, which would mean mounting the common PV in two places).

For storageType: ephemeral, setting ephemeral: true on volumes would have no effect, but for common/async it's needed.

@l0rd
Copy link
Contributor Author

l0rd commented Mar 3, 2021

@amisevsk makes sense. So that would not require a change in the devfile v2 model spec and I am closing this issue then. I have opened an issue for the storageType annotation: #19194

@l0rd l0rd closed this as completed Mar 3, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/devfile-spec Issues related to Devfile v2 engine/devworkspace Issues related to Che configured to use the devworkspace controller as workspace engine. kind/enhancement A feature request - must adhere to the feature request template. kind/epic A long-lived, PM-driven feature request. Must include a checklist of items that must be completed. severity/P1 Has a major impact to usage or development of the system.
Projects
None yet
Development

No branches or pull requests

4 participants