Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Add DevWorkspace as a dependency in che operator #890

Merged
merged 6 commits into from Jul 28, 2021
Merged

Conversation

flacatus
Copy link
Contributor

@flacatus flacatus commented Jul 6, 2021

What does this PR do?

Create a new channel to install Che Operator in AllNamespace Mode:

  1. Install Che using stable-all-namespaces channel

To install Eclipse Che in cluster wide availability after uploading the new bundles for stable-all-namespaces we need to go to OperatorHub, select Eclipse Che and then select the new channel stable-all-namespaces. By default the che operator will be installed in AllNamespace mode and will start to listen for all CheCluster APIS in all cluster.

  1. Migrate che from single Namespace mode to all Namespace mode

If you already have an Eclipse Che installed from stable/nightly channel and you want to try the new channel you need to consider the following:

  • It is not possible to have Eclipse Che installed in single Namespace (currently the default one) and then try to install Che in All Namespace mode using the new channel stable-all-namespaces.

  • To update to stable-all-namespaces channel you need first to remove all subscriptions created for che installed from nightly or stable channels. IMPORTANT: Removing subscriptions doesn’t mean Eclipse Che operands(che-server, keycloak or roles) will be removed from the cluster.

  • DevWorkspace engine will be by default enabled in the new channel.

In case if you have already installed Che with devWorkspace enabled from channels nightly or stable you need to uninstall DevWorkspace completely from the cluster and then install the Che Operator using stable-all-namespaces channel.

  • If you already have all these considerations done you can proceed to install the Che Operator from the OperatorHub using the new channel and the operator will start to manage the resources previously created by the old operators.

Screenshot/screencast of this PR

What issues does this PR fix or reference?

eclipse-che/che#19891

How to test this PR?

  1. Create a new Catalog Source with the new channel and Devworkspace Operator:
export CRW_CATALOG_SOURCE=$(
      oc create -f - -o jsonpath='{.metadata.name}' <<EOF
apiVersion: operators.coreos.com/v1alpha1
kind: CatalogSource
metadata:
  generateName: che-catalog-
  namespace: openshift-marketplace
spec:
  sourceType: grpc
  image: quay.io/flacatus/eclipse-che-openshift-opm-catalog:preview
  displayName: Eclipse Che Catalog
  publisher: Eclipse Che
  updateStrategy:
    registryPoll: 
      interval: 30m
EOF
)echo "Che Catalog: ${CRW_CATALOG_SOURCE}"export DWO_CATALOG_SOURCE=$(
      oc create -f - -o jsonpath='{.metadata.name}' <<EOF
apiVersion: operators.coreos.com/v1alpha1
kind: CatalogSource
metadata:
  generateName: dwo-catalog-
  namespace: openshift-marketplace
spec:
  sourceType: grpc
  image: quay.io/devfile/devworkspace-operator-index:next
  displayName: DevWorkspace Catalog
  publisher: DevWorkspace
  updateStrategy:
    registryPoll: 
      interval: 30m
EOF
)
  1. Install The new stable-all-namespaces channel from Operator Hub:
    image

Installation Results:
image

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.

@tolusha
Copy link
Contributor

tolusha commented Jul 7, 2021

  1. rename channel to stable-all-namespaces (check with OLM team)
  2. update release scripts
  3. keep the same version (check with OLM team)
  4. update chectl to install Eclipse Che from the new channel
  5. update olm/README.md to mention how to install Eclipse Che from the new channel
  6. document how to switch Eclipse Che from one channel to another (channel promotion ?)

@flacatus flacatus marked this pull request as ready for review July 26, 2021 09:12
@flacatus flacatus changed the title feat: Add DevWorkspace like a dependency in che operator feat: Add DevWorkspace as a dependency in che operator Jul 27, 2021
.ci/oci-stable-all-namespaces.sh Show resolved Hide resolved
make-release.sh Outdated Show resolved Hide resolved
Signed-off-by: Flavius Lacatusu <flacatus@redhat.com>
Copy link
Member

@sleshchenko sleshchenko left a comment

Choose a reason for hiding this comment

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

I was not able to test it precisely but nothing critical found.

Two important things:

  1. we need to sync on target openshift version.
  2. I'm not sure if operator should install DWO resources directly, because potentially it can lead to two controllers on the cluster, which would break the stuff.

README.md Outdated Show resolved Hide resolved
README.md Show resolved Hide resolved
* To update to stable-all-namespaces channel you need first to remove all subscriptions created for che installed from nightly or stable
channels. IMPORTANT: Removing subscriptions doesn’t mean Eclipse Che operands(che-server, keycloak or roles) will be removed from the cluster.
* DevWorkspace engine will be by default enabled in the new channel.
* In case if you have already installed Che with DevWorkspace engine enabled from channels nightly or stable you need to remove all DevWorkspace resources from the cluster following the next [scripts](https://github.com/devfile/devworkspace-operator/blob/main/build/make/deploy.mk#L77).
Copy link
Member

Choose a reason for hiding this comment

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

what about DevWorkspace Che Operator resources(in devworkpsace-che-operator namespace)? Then also may exist, but I see that it's not really related to the new channel.

README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
FROM scratch

# Core bundle labels.
LABEL operators.operatorframework.io.bundle.mediatype.v1=registry+v1
Copy link
Member

Choose a reason for hiding this comment

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

We need to sync on which OpenShift versions it's supported.
DWO seems to be available only on OpenShift 4.8+ see here
if lower version is needed - we need to sync how it affects Web Terminals

Copy link
Contributor Author

Choose a reason for hiding this comment

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

agree.

pkg/deploy/dev-workspace/dev_workspace.go Outdated Show resolved Hide resolved
pkg/deploy/dev-workspace/dev_workspace.go Outdated Show resolved Hide resolved
@@ -113,6 +116,12 @@ func ReconcileDevWorkspace(deployContext *deploy.DeployContext) (bool, error) {
return true, nil
}

// Check if exists devworkspace operator csv is already installed
devWorkspaceOperatorCSVExists := isDevWorkspaceControllerCSVExists(deployContext)
if devWorkspaceOperatorCSVExists {
Copy link
Member

Choose a reason for hiding this comment

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

As far as I understand it means that if you install Che with chectl operator installer, DWO will be installed from resources but not with OLM dependency, which may be unexpected in some corner cases, like when WTO is installed after Che with chectl operator installer.

So, I would say Che on OpenShift should install DWO with olm, or at least into openshift-operators namespace...

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, make sense your comments. I think we need to have a dedicate issue for this.

@openshift-ci
Copy link

openshift-ci bot commented Jul 28, 2021

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: flacatus, mkuznyetsov, sleshchenko, tolusha

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 openshift-ci bot removed the lgtm label Jul 28, 2021
@openshift-ci
Copy link

openshift-ci bot commented Jul 28, 2021

New changes are detected. LGTM label has been removed.

@flacatus
Copy link
Contributor Author

/retest

@openshift-ci
Copy link

openshift-ci bot commented Jul 28, 2021

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

Test name Commit Details Rerun command
ci/prow/v7-devworkspace-happy-path e73a7bc link /test v7-devworkspace-happy-path
ci/prow/v8-multi-host-nightly-deployment e73a7bc link /test v8-multi-host-nightly-deployment
ci/prow/v8-single-host-nightly-deployment e73a7bc link /test v8-single-host-nightly-deployment
ci/prow/v8-che-behind-proxy e73a7bc link /test v8-che-behind-proxy

Full PR test history. Your PR dashboard.

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

README.md Outdated
Before installing Eclipse Che using channel `stable-all-namespaces` we need to consider the following:

* It is not possible to have Eclipse Che installed in single Namespace (currently the default one) and then try to install Che in All Namespace mode using the new channel stable-all-namespaces.
* To update to stable-all-namespaces channel you need first to remove all subscriptions created for che installed from nightly or stable
Copy link
Contributor

Choose a reason for hiding this comment

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

Minor: che => Che

Signed-off-by: Flavius Lacatusu <flacatus@redhat.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants