Bundle ArtemisCloud.io

Bunding A Bundle and Deploy it into the Operator Lifecycle Manager(OLM)

About the Operator Lifecycle Manager (OLM)

The Operator Lifecycle Manager can help users to install and manage operators. The ArtemisCloud operator can be built into a bundle image and installed into OLM.


Creating the bundle’s manifests/metadata

Before you build the bundle image generate the manifests and metadata:

make IMAGE_TAG_BASE=<bundle image registry> OPERATOR_IMAGE_REPO=<operator image registry> OPERATOR_VERSION=<operator tag> bundle

Building the bundle image:

make IMAGE_TAG_BASE=<bundle image registry> bundle-build

The result image tag takes the form like


Note: the version v0.0.1 is defined by VERSION variable in the Makefile

To push the built bundle image

make IMAGE_TAG_BASE=<bundle image registry> bundle-push

Building the catalog image

Now with the bundle image in place, build the catalog(index) iamge:

make IMAGE_TAG_BASE=<bundle image registry> catalog-build

The result image tag takes the form like


To push the catalog image to repo:

make IMAGE_TAG_BASE=<bundle image registry> catalog-push

Installing operator via OLM (Minikube)

Install olm (If olm is not installed already)

Make sure the Minikube is up and running.

Use the operator-sdk tool:

operator-sdk olm install

It will deploy the latest olm into Minikube.

Create a catalog source (e.g. catalog-source.yaml):

apiVersion: operators.coreos.com/v1alpha1
kind: CatalogSource
  name: artemis-index
  namespace: operators
  sourceType: grpc
  image: quay.io/hgao/operator-catalog:v0.0.1
  displayName: ArtemisCloud Index
  publisher: ArtemisCloud
      interval: 10m

and deploy it:

$ kubectl create -f catalog-source.yaml

In a moment you will see the index image is up and running in namespace operators:

[a]$ kubectl get pod -n operators
NAME                  READY   STATUS    RESTARTS   AGE
artemis-index-bzh75   1/1     Running   0          42s

Creating a subscription (e.g. subscription.yaml)

apiVersion: operators.coreos.com/v1alpha1
kind: Subscription
  name: my-subscription
  namespace: operators
  channel: upstream
  name: activemq-artemis-operator
  source: artemis-index
  sourceNamespace: operators
  installPlanApproval: Automatic

and deploy it:

  $ kubectl create -f subscription.yaml

An operator will be installed into operators namespace.

$ kubectl get pod -n operators
NAME                                                              READY   STATUS      RESTARTS   AGE
9365c56f188be1738a1fabddb5a408a693d8c1f2d7275514556644e52ejpdpj   0/1     Completed   0          2m20s
activemq-artemis-controller-manager-84d58db649-tkt89              1/1     Running     0          117s
artemis-index-frpn4                                               1/1     Running     0          3m35s