che-operator icon indicating copy to clipboard operation
che-operator copied to clipboard

Support spec.devEnvironments.podSchedulerName in CR

Open dkwon17 opened this issue 3 years ago • 4 comments

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.podSchedulerName field is set to testing123.
  • the DWOC is updated, the workspace.schedulerName field is set to testing123.
  • a workspace is started, and the workspace pod has a schedulerName of testing123`.
  • in the Che CR, the devEnvironments.podSchedulerName field is removed.
  • the DWOC is updated, the workspace.schedulerName field is now unset.
  • a workspace is started, and the workspace pod has the default schedulerName of default-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:

Reviewers

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

dkwon17 avatar Nov 18 '22 21:11 dkwon17

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

openshift-ci[bot] avatar Nov 18 '22 21:11 openshift-ci[bot]

[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.

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

openshift-ci[bot] avatar Nov 18 '22 21:11 openshift-ci[bot]

Codecov Report

Merging #1565 (49ff5e4) into main (eaef8a4) will increase coverage by 0.02%. The diff coverage is 100.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.

codecov[bot] avatar Nov 18 '22 21:11 codecov[bot]

@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.

openshift-merge-robot avatar Nov 25 '22 11:11 openshift-merge-robot

Closing in favour of https://github.com/eclipse-che/che-operator/pull/1565

dkwon17 avatar Dec 22 '22 21:12 dkwon17