kubernetesdocker-desktopeclipse-che

How to mount volumes in eclipse che workspaces running in kubernetes?


Users will visit https://che-eclipse-che.192.168.0.1.nip.io/#https://github.com/test/eclipse-che It has the devfile to create the workspace.

First user registration will happen via keycloak and then the workspace will be created. This means a new kubernetes namespace will also be created for the user.

In the devfile I have the environment variable:

    env:
      - value: /C/Users/Administrator/.m2:/home/user/.m2
        name: CHE_WORKSPACE_VOLUME

But the volume is not available in the workspace. What am I doing wrong?


Solution

  • The way how you can use persistent storage in Che is described in https://www.eclipse.org/che/docs/che-7/end-user-guide/configuring-a-workspace-using-a-devfile/#adding-components-to-a-devfile_che

    But I'm afraid it won't satisfy your need. Are you asking for every user to use your local maven repository? If so, it's not possible. You can only enable maven repository volume for each workspace, so after workspace restart files will be used from the previous time, but each workspace uses its own private space.