Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@rohanKanojia
Copy link
Contributor

@rohanKanojia rohanKanojia commented Aug 26, 2025

What does this PR do?

Allow to configure defaultContainerResources field for DevWorkspaceOperatorConfig from CheCluster

spec:
  devEnrinoments:
    defaultContainerResources:
      limits:
        cpu: 200m
        memory: 200Mi
      requests:
        cpu: 100m
        memory: 100Mi
...

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

Screenshot/screencast of this PR

N/A

What issues does this PR fix or reference?

https://issues.redhat.com/browse/CRW-9289

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:
    limits:
      memory: 200Mi
      cpu: 200m
    requests:
      memory: 100Mi
      cpu: 100m
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

After deployment, you should be able to see DevWorkspaceOperatoConfig contain the cpu/memory limits that were configured in CheCluster patch:

kubectl get dwoc devworkspace-config -neclipse-che -o jsonpath='{.config.workspace.defaultContainerResources}'
{"limits":{"cpu":"200m","memory":"200Mi"},"requests":{"cpu":"100m","memory":"100Mi"}}

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 Aug 26, 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/dwoc-container-resources-checluster branch 2 times, most recently from 0e0e95a to d394187 Compare August 26, 2025 17:03
@rohanKanojia
Copy link
Contributor Author

I'm not sure how changes in this PR could have caused dependency-validation check to have failed. Is this failure intermittent?

When I try to run this script locally (with some debug output), I see that it fails on main branch too:

[ERROR] Invalid JSON from: https://api.clearlydefined.io/definitions/go/golang/github.com/kr/logfmt/v0.0.0-20140226030751-b84e30acd515
[DEBUG] Response:
error code: 502
[INFO] All dependencies are defined correctly.

@rohanKanojia rohanKanojia force-pushed the pr/dwoc-container-resources-checluster branch from d394187 to 687adeb Compare August 28, 2025 09:37
@rohanKanojia rohanKanojia force-pushed the pr/dwoc-container-resources-checluster branch from 687adeb to f016ec8 Compare August 28, 2025 09:42
@rohanKanojia rohanKanojia marked this pull request as ready for review August 28, 2025 10:33
@rohanKanojia
Copy link
Contributor Author

/retest

3 similar comments
@rohanKanojia
Copy link
Contributor Author

/retest

@rohanKanojia
Copy link
Contributor Author

/retest

@tolusha
Copy link
Contributor

tolusha commented Aug 29, 2025

/retest

…DevWorkspaceOperatorConfig

Signed-off-by: Rohan Kumar <[email protected]>
@rohanKanojia rohanKanojia force-pushed the pr/dwoc-container-resources-checluster branch from f016ec8 to 8012391 Compare September 1, 2025 06:07
@openshift-ci
Copy link

openshift-ci bot commented Sep 1, 2025

@rohanKanojia: The following tests failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
ci/prow/v14-upgrade-stable-to-next 8012391 link true /test v14-upgrade-stable-to-next
ci/prow/v14-devworkspace-happy-path 8012391 link true /test v14-devworkspace-happy-path

Full PR test history. Your PR dashboard.

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. I understand the commands that are listed here.

@openshift-ci
Copy link

openshift-ci bot commented Sep 1, 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 tolusha merged commit 980fe0e into eclipse-che:main Sep 1, 2025
18 of 20 checks passed
@rohanKanojia rohanKanojia deleted the pr/dwoc-container-resources-checluster branch September 1, 2025 08:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants