Creating an Index of operator bundles

Add/Remove a collection of bundles to/from an Index


Creating an Index

OLM's CatalogSource CRD define a reference to a catalog of operators that are available to install onto a cluster. To make your operator bundle available, you can add the bundle to a container image which the CatalogSource points to. This image contains a record of bundle images that OLM can pull and extract the manifests from in order to install an operator.

Note: The container image also contains information that represents the upgrade graphs between different operator versions, an operator’s dependencies etc graphically. To learn more about the upgrade graph of an operator, checkout the creating an upgrade graph doc

So, to make your operator available to OLM, you can generate an index image via opm with your bundle reference included:

$ opm index add --bundles --tag
$ podman push

The resulting image is referred to as an Index. Now that image is available for clusters to use and reference with CatalogSources on their cluster.

Index images are additive, so you can add a new version of your operator bundle when you publish a new version of your operator:

$ opm index add --bundles --from-index --tag

Other operations on an Index using opm

The opm index command contains additional sub-commands that can be used to perform different operations like remove an operator from an index, prune an index of all but specified operators etc. Please checkout the documentation under opm index -h for more information.