-
Have the operator-sdk 0.17.0 tool
-
Have the OPM tool
=> Build it from here: https://github.com/operator-framework/operator-registry/blob/master/docs/design/operator-bundle.md#opm-operator-package-manager
operator-sdk generate csv --apis-dir /home/dfestal/go/src/github.com/che-incubator/che-workspace-operator/pkg/apis --operator-name che-workspace-operator --make-manifests --csv-version=0.0.1
operator-sdk bundle create quay.io/dfestal/che-workspace-operator-catalog:0.1.1 --channels beta --package che-workspace-operator-catalog --directory deploy/olm-catalog/che-workspace-operator/manifests --overwrite --output-dir generated
docker push quay.io/dfestal/che-workspace-operator-catalog:0.1.1
opm index add -c docker --bundles quay.io/dfestal/che-workspace-operator-catalog:0.1.1 --tag quay.io/dfestal/che-workspace-operator-index:0.1.1
docker push quay.io/dfestal/che-workspace-operator-index:0.1.1
oc apply -f catalog-source.yaml
- Didn't experiment how to manage updates, how to add new versions in an index and have it automatically detected by OLM
- There is a problem with the registry service that is added in teh manifest. It is correctly taken in account and installed, but when the operator is removed by OLM from OperatorHub, the service is not removed, and the next OperatorHub installation will fail (=> not well supported, probably an issue to open on their side)
- Anyway you might want to remove the registry service for now if we stick to the cloud shell use-case as a first step.
- if you want the
operator-sdk generate csv
step to correctly update your CSV based on the content of teh deploy folder, you might need to rename theo/controller.yaml
tooperator.yaml
and bring it back into thedeploy/
folder, unless you will have to provide an additinoal conf file for thegenerate csv
command.