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

Implement Volume component #185

Closed
sleshchenko opened this issue Oct 22, 2020 · 0 comments · Fixed by #237
Closed

Implement Volume component #185

sleshchenko opened this issue Oct 22, 2020 · 0 comments · Fixed by #237
Assignees
Milestone

Comments

@sleshchenko
Copy link
Member

sleshchenko commented Oct 22, 2020

It's needed to implement Volume component that will define PVC or emptyDir with size configuration.

components:
  - name: maven
    container:
      image: registry.redhat.io/codeready-workspaces/stacks-java-rhel8:2.1
      mountSources: true
      volumeMounts:
        - name: my-storage
          path: /home/jboss/.settings
  - name: my-storage
    volume:
      size: 500Mi

If component references non-declared volume - devworkspace should fail to start or failed to be created?
Probably failed to start since such validation needs external resources to be fetched like in plugins case. See below.

? mountSource: true should be converted to volume with name projects?

Volume can be reused/configured from plugin. Like here https://github.com/devfile/api/blob/master/samples/devfiles/spring-boot-http-booster-devfile.yaml.

...
components:
  - name: java-support
    plugin:
      id: redhat/java8/latest
      components:
        - name: vscode-java            
          container:
            memoryLimit: 2Gi
        - name: m2 # it already has volume define we just configure it
          volume:
            size: 2G
...
  - name: maven-tooling
    container:
      image: registry.redhat.io/codeready-workspaces/stacks-java-rhel8:2.1
      mountSources: true
      memoryLimit: 768Mi
      volumeMounts:
        - name: m2 # using volume from plugin definition
          path: /home/jboss/.m2

Which PVC strategy we should support in devworkspace? Probably common only - one PVC for one namespace. Should we implement the same isolation mechanism as for Che?

- PVC structure:
/workspaceId1
  /volumeName1
  /volumeName2
/workspaceId2
  /volumeName1
  /volumeName2

? Since plugins need volumes in initContainers, we can face issues with initSubpaths from initContainer

func precreateSubpathsInitContainer(workspaceId string) corev1.Container {
and probably we need to run a separate job to do it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants