Skip to content

Conversation

@rohanKanojia
Copy link
Contributor

@rohanKanojia rohanKanojia commented Jun 13, 2025

What does this PR do?

This is a follow-up PR to devfile/devworkspace-operator#1430

  • Update github.com/devfile/devworkspace-operator dependency to v0.35.0
  • Add storageAccessMode to PVC che cluster types
  • Set StorageAccessMode while updating WorkspaceConfig during reconcile

Signed-off-by: Rohan Kumar [email protected]

Screenshot/screencast of this PR

What issues does this PR fix or reference?

It's related to this PR devfile/devworkspace-operator#1430

How to test this PR?

  1. Prepare a patch file if needed:
cat > /tmp/cr-patch.yaml <<EOF
apiVersion: org.eclipse.che/v2
kind: CheCluster
spec:
  devEnvironments:
    storage:
      perUserStrategyPvcConfig:
        storageAccessMode:
        - ReadWriteMany
EOF
  1. Deploy the operator:

OpenShift

./build/scripts/olm/test-catalog-from-sources.sh --cr-patch-yaml /tmp/cr-patch.yaml

on Minikube

./build/scripts/minikube-tests/test-operator-from-sources.sh --cr-patch-yaml /tmp/cr-patch.yaml
  1. Verify that the devworkspace-config DWOC in the eclipse-che namespace has the following fields:
kubectl get dwoc devworkspace-config -neclipse-che -ojsonpath='{.config.workspace.storageAccessMode}'
["ReadWriteMany"]
  1. In the Che CR, spec.devEnvironments.storage.perUserStrategyPvcConfig.storageAccessMode to [ "ReadOnlyMany" ]. Verify that the DWOC has the same fields:
kubectl get dwoc devworkspace-config -neclipse-che -ojsonpath='{.config.workspace.storageAccessMode}'
["ReadOnlyMany"]
  1. In the Che CR, remove the spec.devEnvironments.storage.perUserStrategyPvcConfig.storageAccessMode field. Verify that the storageAccessMode has been removed from the DWOC:
# Should return blank output
kubectl get dwoc devworkspace-config -neclipse-che -ojsonpath='{.config.workspace.storageAccessMode}'

PR Checklist

As the author of this Pull Request I made sure that:

Reviewers

Reviewers, please comment how you tested the PR when approving it.

@openshift-ci
Copy link

openshift-ci bot commented Jun 13, 2025

Hi @rohanKanojia. Thanks for your PR.

I'm waiting for a eclipse-che member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@rohanKanojia rohanKanojia force-pushed the pr/add-storageaccessmode branch 4 times, most recently from ce445f3 to 94b67c3 Compare June 26, 2025 14:03
Update github.com/devfile/devworkspace-operator dependency to v0.35.0

Signed-off-by: Rohan Kumar <[email protected]>
…concile

While updating WorkspaceConfig with CheClusterDevEnvironment also set StorageAccessMode
if present.

Signed-off-by: Rohan Kumar <[email protected]>
@rohanKanojia rohanKanojia force-pushed the pr/add-storageaccessmode branch from 94b67c3 to e2c3bf9 Compare July 27, 2025 15:42
@rohanKanojia rohanKanojia marked this pull request as ready for review July 27, 2025 16:11
@rohanKanojia
Copy link
Contributor Author

/retest

@openshift-ci
Copy link

openshift-ci bot commented Jul 28, 2025

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: rohanKanojia, tolusha

The full list of commands accepted by this bot can be found 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

@tolusha
Copy link
Contributor

tolusha commented Jul 28, 2025

@rohanKanojia
Please merge

@rohanKanojia
Copy link
Contributor Author

rohanKanojia commented Jul 28, 2025

@tolusha : Sorry, I don't have merge access.

Shall we wait for @dkwon17 's approval as well?

// It is used to specify PersistentVolume access mode type to RWO/RWX when using per-user strategy, allowing
// user to re-use volume across multiple workspaces.
//
// It defaults to ReadWriteOnce if not specified
Copy link
Contributor

@dkwon17 dkwon17 Jul 28, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The default ReadWriteOnce is not being used in this case,

For example, if I set:

    storage:
      perUserStrategyPvcConfig:
        storageAccessMode:
          - ReadWriteMany
      pvcStrategy: per-user

And then if I remove perUserStrategyPvcConfig:

  storage:
    pvcStrategy: per-user

the DWOC still has ReadWriteMany:

apiVersion: controller.devfile.io/v1alpha1
config:
  workspace:
    storageAccessMode:
      - ReadWriteMany

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

storageClass and claimSize has the same behaviour where the defaults aren't applied:

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've created this issue for addressing it eclipse-che/che#23502

@tolusha tolusha merged commit e4c14a2 into eclipse-che:main Jul 28, 2025
20 checks passed
@rohanKanojia rohanKanojia deleted the pr/add-storageaccessmode branch July 28, 2025 15:37
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.

3 participants