che-operator/olm
Anatolii Bazko 1a9d5b2f09
chore: Move to semver mode update (#1295)
Signed-off-by: Anatolii Bazko <abazko@redhat.com>
2022-01-20 16:32:07 +02:00
..
README.md chore: remove reference to platform when deal with olm bundle (#1239) 2021-12-09 11:32:40 +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 fix: Fix license headers (#1170) 2021-11-16 11:17:18 +02:00
dockerContainerExtract.sh fix: Fix license headers (#1170) 2021-11-16 11:17:18 +02: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: Move to semver mode update (#1295) 2022-01-20 16:32:07 +02:00
release-olm-files.sh chore: Move to semver mode update (#1295) 2022-01-20 16:32:07 +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 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

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