Merge pull request #19 from sutaakar/image-tag

Adjust expected image stream tags to Kogito 0.2.0 images
tree: cc9a180193c30c1b4efe73e898ff0b4bf1106097
  1. build/
  2. cmd/
  3. deploy/
  4. hack/
  5. pkg/
  6. vendor/
  7. version/
  8. .gitignore
  9. Gopkg.lock
  10. Gopkg.toml
  11. LICENSE
  12. Makefile
  13. README.md
README.md

Kogito Operator

Go Report Card

Requirements

  • go v1.11+
  • dep v0.5.x
  • operator-sdk v0.7.0
  • ocp 4.x
  • kogito s2i imagestreams installed

Build

make

Upload to a container registry

e.g.

docker push quay.io/kiegroup/kogito-cloud-operator:<version>

Deploy to OpenShift 4 using OLM

To install this operator on OpenShift 4 for end-to-end testing, make sure you have access to a quay.io account to create an application repository. Follow the authentication instructions for Operator Courier to obtain an account token. This token is in the form of “basic XXXXXXXXX” and both words are required for the command.

Push the operator bundle to your quay application repository as follows:

operator-courier push deploy/catalog_resources/courier/0.1.0 kiegroup kogitocloud-operator 0.1.0 "basic XXXXXXXXX"

If pushing to another quay repository, replace kiegroup with your username or other namespace. Also note that the push command does not overwrite an existing repository, and it needs to be deleted before a new version can be built and uploaded. Once the bundle has been uploaded, create an Operator Source to load your operator bundle in OpenShift.

## kogito imagestreams should already be installed/available ... e.g.
oc apply -f https://raw.githubusercontent.com/kiegroup/kogito-cloud/master/s2i/kogito-imagestream.yaml -n openshift
oc create -f deploy/catalog_resources/courier/kiecloud-operatorsource.yaml

Remember to replace registryNamespace with your quay namespace. The name, display name and publisher of the operator are the only other attributes that may be modified.

It will take a few minutes for the operator to become visible under the OperatorHub section of the OpenShift console Catalog. It can be easily found by filtering the provider type to Custom.

Deploy to OpenShift 3.11 manually

## kogito imagestreams should already be installed/available ... e.g.
oc apply -f https://raw.githubusercontent.com/kiegroup/kogito-cloud/master/s2i/kogito-imagestream.yaml -n openshift
oc new-project <project-name>
./hack/3.11deploy.sh

Trigger a KogitoApp deployment

Use the OLM console to subscribe to the kogito Operator Catalog Source within your namespace. Once subscribed, use the console to Create KogitoApp or create one manually as seen below.

$ oc create -f deploy/crs/app_v1alpha1_kogitoapp_cr.yaml
kogitoapp.app.kiegroup.org/example-quarkus created

Clean up a KogitoApp deployment

oc delete kogitoapp example-quarkus

Development

Change log level at runtime w/ the DEBUG environment variable. e.g. -

make dep
make clean
DEBUG="true" operator-sdk up local --namespace=<namespace>

Before submitting PR, please be sure to generate, vet, format, and test your code. This all can be done with one command.

make test