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

Extending Volume components to support more features #310

Closed
amisevsk opened this issue Jan 18, 2021 · 5 comments · Fixed by devfile/devworkspace-operator#281
Closed

Extending Volume components to support more features #310

amisevsk opened this issue Jan 18, 2021 · 5 comments · Fixed by devfile/devworkspace-operator#281
Assignees
Labels
area/api Enhancement or issue related to the api/devfile specification
Milestone

Comments

@amisevsk
Copy link
Contributor

Is your feature request related to a problem? Please describe.

Currently, Volume components in a devfile only support a size field. It would be useful to be able to specify more information about what sort of volume is needed:

  • Specify that a volume does not require persistent storage (e.g. can be provisioned as an emptyDir volume) -- such volumes are useful for sharing data between containers
  • Specify that a volume should exist already (i.e. don't create a volume from this file) -- this would be useful for specifying e.g. a shared ROX assets volume that can be mounted to multiple workspaces
  • Specify an external volume's type (e.g. link to a secret that exists on the cluster; link to a configmap on the cluster) -- this would allow mounting secrets/configmaps that already exist into new workspaces.

Describe the solution you'd like

Introduce additional fields on volume components:

  • persistent - whether persistent volume is expected to be available after workspace is stopped (default: true)
  • external - defines volume as external to the current workspace (i.e. its lifecycle is separate)
  • external.type - type of external volume, e.g. "secret", "configmap", or "storage"
  • external.name - name of existing resource on cluster

Something like

spec:
  components:
    - name: my-ephemeral-volume 
      volume:
        persistent: false # Volume my-ephemeral-volume will be mounted as emptyDir

    - name: my-external-volume
      volume:
        external: # Setting fields indicates that this is an external volume
          type: storage
          name: my-pvc
            
    - name: my-existing-secret
      volume:
        external:
          type: secret # or configmap
          name: my-secret

Describe alternatives you've considered

Suggestions are more than welcome

@amisevsk
Copy link
Contributor Author

cc: @davidfestal @l0rd

@maysunfaisal
Copy link
Member

maysunfaisal commented Jan 21, 2021

I would also like to add to this issue that, we may need to have secrets for outerloop dockerfile build(build guidance) if we want to push to private registries using build configs or importing from private git repos - https://docs.openshift.com/container-platform/4.6/builds/creating-build-inputs.html

@l0rd
Copy link
Contributor

l0rd commented Jan 25, 2021

We currently support injecting secrets as files or environment values in Che. But secrets are not specified in the devfile but using some specific labels and annotations on secrets.

We decided to go along that path because we wanted to decouple the secrets (that we considered users specific config) from the devfile (supposed to be shared across users, teams, companies).

This was referenced Jan 26, 2021
@elsony elsony added the area/api Enhancement or issue related to the api/devfile specification label Jan 26, 2021
@elsony elsony added this to the 2.1 milestone Feb 11, 2021
@amisevsk amisevsk self-assigned this Feb 23, 2021
@sleshchenko
Copy link
Member

@amisevsk Do you have a separate issue for external volumes?

@amisevsk
Copy link
Contributor Author

@sleshchenko I suppose I didn't create one apart from this. I'll separate one out.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/api Enhancement or issue related to the api/devfile specification
Projects
None yet
5 participants