Skip to content

feat : [CRW-5722] Add configuration option in DevWorkspaceOperatorConfig for storage access mode (#1019)#1430

Merged
dkwon17 merged 2 commits intodevfile:mainfrom
rohankanojia-forks:pr/issue-crw-5722
Jun 12, 2025
Merged

feat : [CRW-5722] Add configuration option in DevWorkspaceOperatorConfig for storage access mode (#1019)#1430
dkwon17 merged 2 commits intodevfile:mainfrom
rohankanojia-forks:pr/issue-crw-5722

Conversation

@rohanKanojia
Copy link
Copy Markdown
Member

@rohanKanojia rohanKanojia commented May 8, 2025

What does this PR do?

  • Add a configuration option named StorageAccessMode in WorkspaceConfig struct
  • Set PVC accessMode if the above-mentioned option is set in WorkspaceConfig, default to ReadWriteOnce

What issues does this PR fix or reference?

Fix #1019

Related to https://issues.redhat.com/browse/CRW-5722

Is it tested? How?

  • Create this DevWorkspaceConfig that provides storageAccessMode for ReadWriteMany
apiVersion: controller.devfile.io/v1alpha1
config:
  enableExperimentalFeatures: true
  routing:
    clusterHostSuffix: 127.0.0.1.nip.io
    defaultRoutingClass: basic
  workspace:
    imagePullPolicy: Always
    storageAccessMode:
    - ReadWriteMany
kind: DevWorkspaceOperatorConfig
metadata:
  name: external-dwoc-test
  • Create a DevWorkspace using abovementioned workspace config:
kind: DevWorkspace
apiVersion: workspace.devfile.io/v1alpha2
metadata:
  name: theia-next-external-dwoc
spec:
  started: true
  template:
    attributes:
        controller.devfile.io/storage-type: common
        controller.devfile.io/devworkspace-config:
          name: external-dwoc-test
          namespace: devworkspace-controller
    projects:
      - name: web-nodejs-sample
        git:
          remotes:
            origin: "https://github.com/che-samples/web-nodejs-sample.git"
    components:
    - name: tools
      container:
        image: quay.io/devfile/universal-developer-image:ubi9-latest
        memoryLimit: 256Mi
        mountSources: true
    commands:
      - id: say-hello
        exec:
          component: theia-ide
          commandLine: echo "Hello world"
  • After applying these manifests, check the PVC created should have the same accessMode as specified in DevWorkspaceConfig:
oc get pvc external-dwoc-pvc -o=jsonpath='{.status.accessModes}'
["ReadWriteMany"]

PR Checklist

  • E2E tests pass (when PR is ready, comment /test v8-devworkspace-operator-e2e, v8-che-happy-path to trigger)
    • v8-devworkspace-operator-e2e: DevWorkspace e2e test
    • v8-che-happy-path: Happy path for verification integration with Che

@openshift-ci
Copy link
Copy Markdown

openshift-ci Bot commented May 8, 2025

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

@rohanKanojia rohanKanojia force-pushed the pr/issue-crw-5722 branch 4 times, most recently from 49a6774 to 9de9d22 Compare May 9, 2025 09:35
@rohanKanojia
Copy link
Copy Markdown
Member Author

/ok-to-test

@rohanKanojia rohanKanojia force-pushed the pr/issue-crw-5722 branch 4 times, most recently from a36b8fb to cfb338e Compare May 12, 2025 05:44
@rohanKanojia
Copy link
Copy Markdown
Member Author

/ok-to-test

@rohanKanojia
Copy link
Copy Markdown
Member Author

/ok-to-test

@rohanKanojia rohanKanojia marked this pull request as ready for review May 12, 2025 12:42
@rohanKanojia
Copy link
Copy Markdown
Member Author

/ok-to-test

@rohanKanojia
Copy link
Copy Markdown
Member Author

/ok-to-test

- Add configuration option named StorageAccessMode in WorkspaceConfig struct

Signed-off-by: Rohan Kumar <rohaan@redhat.com>
…fig for storage access mode (devfile#1019)

Set PVC accessMode if abovementioned option is set in WorkspaceConfig, default to ReadWriteOnce

Signed-off-by: Rohan Kumar <rohaan@redhat.com>
@openshift-ci
Copy link
Copy Markdown

openshift-ci Bot commented Jun 12, 2025

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: akurinnoy, dkwon17, ibuziuk, rohanKanojia

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@dkwon17 dkwon17 merged commit 58881e0 into devfile:main Jun 12, 2025
8 checks passed
@rohanKanojia rohanKanojia deleted the pr/issue-crw-5722 branch June 13, 2025 02:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Make workspace PVC's Access mode configurable

4 participants