Support spec.devEnvironments.podSchedulerName in CR
What does this PR do?
This PR is a draft PR because this PR depends on DWO 0.18.0, since that is when the config.workspace.schedulerName field would be introduced for the DWO config. This PR can still be tested, since the devworkspace-operator dependency in go.mod has been temporarily updated to point to this PR branch that introduced config.workspace.schedulerName
Should be merged after https://github.com/eclipse-che/che-operator/pull/1549 is merged
This PR introduces the devEnvironments.podSchedulerName field in the Che CR. When this field is set, it updates the config.workspace.schedulerName field of the Che-operator-managed DWO config.
Screenshot/screencast of this PR
In this demo:
- in the Che CR, the
devEnvironments.podSchedulerNamefield is set totesting123. - the DWOC is updated, the
workspace.schedulerNamefield is set totesting123. - a workspace is started, and the workspace pod has a
schedulerName oftesting123`. - in the Che CR, the
devEnvironments.podSchedulerNamefield is removed. - the DWOC is updated, the
workspace.schedulerNamefield is now unset. - a workspace is started, and the workspace pod has the default
schedulerName ofdefault-scheduler`.
https://user-images.githubusercontent.com/83611742/202806779-5bbe738e-0dc4-4ca5-8382-3d613ce43873.mp4
What issues does this PR fix or reference?
https://github.com/eclipse/che/issues/21803
How to test this PR?
cat > /tmp/cs.yaml <<EOF
apiVersion: operators.coreos.com/v1alpha1
kind: CatalogSource
metadata:
name: eclipse-che-custom-catalog
namespace: eclipse-che
spec:
image: quay.io/dkwon17/eclipse-che-openshift-opm-catalog:schedulerName
sourceType: grpc
updateStrategy:
registryPoll:
interval: 5m
EOF
chectl server:deploy \
--che-operator-image=quay.io/dkwon17/che-operator:schedulerName \
--installer=olm \
--platform=openshift \
--catalog-source-yaml /tmp/cs.yaml \
--olm-channel=next \
--package-manifest-name=eclipse-che-preview-openshift
PR Checklist
As the author of this Pull Request I made sure that:
- [ ] The Eclipse Contributor Agreement is valid
- [ ] Code produced is complete
- [ ] Code builds without errors
- [ ] Tests are covering the bugfix
- [ ] Development resource are up to date
- [ ] The repository devfile is up to date and works
- [ ] Sections
What issues does this PR fix or referenceandHow to test this PRcompleted - [ ] Relevant user documentation updated
- [ ] Relevant contributing documentation updated
- [ ] CI/CD changes implemented, documented and communicated
Reviewers
Reviewers, please comment how you tested the PR when approving it.
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
[APPROVALNOTIFIER] This PR is NOT APPROVED
This pull-request has been approved by: dkwon17
The full list of commands accepted by this bot can be found here.
Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment
Codecov Report
Merging #1565 (49ff5e4) into main (eaef8a4) will increase coverage by
0.02%. The diff coverage is100.00%.
@@ Coverage Diff @@
## main #1565 +/- ##
==========================================
+ Coverage 60.54% 60.56% +0.02%
==========================================
Files 73 73
Lines 6303 6307 +4
==========================================
+ Hits 3816 3820 +4
Misses 2147 2147
Partials 340 340
| Impacted Files | Coverage Δ | |
|---|---|---|
| api/v2/checluster_types.go | 30.43% <ø> (ø) |
|
| ...eploy/dev-workspace-config/dev_workspace_config.go | 90.90% <100.00%> (+0.71%) |
:arrow_up: |
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.
@dkwon17: PR needs rebase.
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/test-infra repository.
Closing in favour of https://github.com/eclipse-che/che-operator/pull/1565