Skip to content

Support externally-defined volume components #374

@amisevsk

Description

@amisevsk

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

This issue is a follow-up to the second half of #310 -- supporting "external" volumes.

We've seen use cases where users have defined volumes on their cluster (configmaps/secrets or persistent storage) that they would like to use with their devfiles -- for example:

  • Mounting an shared ROX volume containing assets to workspaces
  • Mounting secrets that are managed outside the scope of devfiles/the DevWorkspace operator

Implementation options

There are various ways to go about this, all with drawbacks

  1. Automatically mount configmaps/secrets/volumes based off of annotations on the underlying object (similar functionality is planned for DWO for secrets/configmaps). The downside is that the underlying objects have to be configured to support this, and it might be hard to follow for users.
  2. Add fields to volume components to support referencing cluster resources:
    spec:
      - 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
    the downside here is that such devfiles would only work on a cluster that has the external resources (i.e. they aren't widely portable). A user/organization using this functionality may not be too concerned, though.
  3. Same as 2. but introduce a new component type (externalVolume?) to make the distinction between the two clearer and avoid ambiguity around other volume component fields.

Additional context

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/apiEnhancement or issue related to the api/devfile specificationarea/devworkspaceImprovent or additions to the DevWorkspaces CRDkind/enhancementNew feature or requestlifecycle/rottenRotten items. These items have been stale for 60 days and are now closed.lifecycle/staleStale items. These items have not been updated for 90 days.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions