che-operator/olm
Nick Boldt 21da2fc695
fix: CRW-2818 switch to new flavour... (#1344)
* fix: CRW-2818 switch to new flavour devspaces (no more codeready flavour)

Change-Id: I5fd0ef785d55ca2cc0653c7afb696798c2f7935b
Signed-off-by: nickboldt <nboldt@redhat.com>

* run 'make update-resources -s'

Change-Id: Ibe0bab0d3c803564feb161896f28a23bf378b444
Signed-off-by: nickboldt <nboldt@redhat.com>

* fixup

Signed-off-by: Anatolii Bazko <abazko@redhat.com>

Co-authored-by: Anatolii Bazko <abazko@redhat.com>
2022-03-17 09:46:57 -03:00
..
README.md feat: Switch to operator-sdk v1.9.2 (#1323) 2022-02-17 14:30:53 +02:00
addDigests.sh fix: Fix license headers (#1170) 2021-11-16 11:17:18 +02:00
buildCatalog.sh Deploy Dev Workspace from `fast` channel before deploying Eclipse Che using `testCatalog.sh` (#1277) 2022-01-05 11:28:10 +02:00
buildDigestMap.sh fix: Fix license headers (#1170) 2021-11-16 11:17:18 +02:00
check-yq.sh fix: Fix license headers (#1170) 2021-11-16 11:17:18 +02:00
ci.yaml chore: Move to semver mode update (#1295) 2022-01-20 16:32:07 +02:00
digestExcludeList ci: Add next images build (#863) 2021-06-30 15:14:04 +03:00
docker-run.sh chore: Update DevWorkspace Operator dependency to v0.12.2 (#1302) 2022-02-01 10:46:21 +02:00
dockerContainerExtract.sh fix: CRW-2818 switch to new flavour... (#1344) 2022-03-17 09:46:57 -03:00
force-pulling-olm-images-job.yaml fix: Fix license headers (#1170) 2021-11-16 11:17:18 +02:00
images.sh fix: Fix license headers (#1170) 2021-11-16 11:17:18 +02:00
minikube-registry-addon.sh fix: Fix license headers (#1170) 2021-11-16 11:17:18 +02:00
olm.sh Deploy Dev Workspace from `fast` channel before deploying Eclipse Che using `testCatalog.sh` (#1277) 2022-01-05 11:28:10 +02:00
prepare-community-operators-update.sh chore: since we don't publish to k8s-operatorhub/community-operators as of Che 7.40, remove obsolete code; also fix typo and update MM message (#21161) (#1331) 2022-03-03 12:29:37 -04:00
release-olm-files.sh chore: Drop backup/restore functionality (#1300) 2022-02-01 15:51:26 +02:00
testCatalog.sh Deploy stable version of Dev Workspace operator when Eclipse Che is deployed with testCatalog.sh or testUpdate.sh (#1280) 2022-01-10 10:50:37 +02:00
testUpdate.sh ci: Copy 7.44.0 csv to main (#1329) 2022-03-02 18:00:21 -04:00

README.md

Operator lifecycle manager

Prerequisites

OLM packages scripts are using some required dependencies that need to be installed

WARNING: Please make sure to use the precise v1.9.2 version of the operator-sdk.

Eclipse Che OLM bundles

OLM (operator lifecycle manager) provides ways of installing operators. One of the convenient way how to achieve it is by using OLM bundles. See more about the format: https://github.com/openshift/enhancements/blob/master/enhancements/olm/operator-bundle.md. There two OLM bundles:

  • bundle/next/eclipse-che-preview-openshift/manifests for the next channel
  • bundle/stable/eclipse-che-preview-openshift/manifests for the stable channel

Each bundle consists of a cluster service version file (CSV) and a custom resource definition files (CRD). CRD file describes checlusters Kubernetes api resource object(object fields name, format, description and so on). Kubernetes api needs this information to correctly store a custom resource object "checluster". Custom resource object users could modify to change Eclipse Che configuration. Che operator watches checlusters object and re-deploy Che with desired configuration. The CSV file contains all "deploy" and "permission" specific information, which OLM needs to install Eclipse Che operator.

Testing custom CatalogSource and next bundle images

To test next Che operator you have to use the OLM CatalogSource(index) image. CatalogSource image stores in the internal database information about OLM bundles with different versions of the Eclipse Che. Eclipse Che provides quay.io/eclipse/eclipse-che-openshift-opm-catalog:next catalog source images for the next channel.

For each new next version Eclipse Che provides the corresponding bundle image with name pattern:

quay.io/eclipse/eclipse-che-openshift-opm-bundles:<CHE_VERSION>-<INCREMENTAL_VERSION>.next

For example:

quay.io/eclipse/eclipse-che-openshift-opm-bundles:7.19.0-5.next

Build custom next/stable OLM images

For test purpose you can build your own "next" or "stable" CatalogSource and bundle images with your latest development changes and use it in the test scripts. To build these images you can use script olm/buildCatalog.sh:

$ olm/buildCatalog.sh \
    -c (next|stable) \
    -i <CATALOG_IMAGE>

Testing custom CatalogSource and bundle images on the Openshift

To test the latest custom "next" bundle:

$ ./testCatalog.sh -c next -i <CATALOG_IMAGE> -n eclipse-che

If your CatalogSource image contains few bundles, you can test migration from previous bundle to the latest:

$ ./testUpdate.sh -c next -i <CATALOG_IMAGE> -n eclipse-che

Install Eclipse Che from stable channel using testing catalog source image

Before publishing Eclipse Che in the community operator catalogs, we test new release using "stable" OLM channel from testing catalog source image.

  1. Create a custom catalog source:
apiVersion:  operators.coreos.com/v1alpha1
kind:         CatalogSource
metadata:
  name:         eclipse-che-preview-custom
  namespace:    eclipse-che
spec:
  image:        quay.io/eclipse/eclipse-che-openshift-opm-catalog:test
  sourceType:  grpc
  updateStrategy:
    registryPoll:
      interval: 5m
  1. Deploy Che operator:
$ chectl server:deploy --installer=olm --platform=openshift --catalog-source-yaml <PATH_TO_CUSTOM_CATALOG_SOURCE_YAML> --olm-channel=stable --package-manifest-name=eclipse-che-preview-openshift