:_mod-docs-content-type: ASSEMBLY
[id="olm-managing-custom-catalogs"]
= Managing custom catalogs
include::_attributes/common-attributes.adoc[]
:context: olm-managing-custom-catalogs

toc::[]

[role="_abstract"]
ifndef::openshift-dedicated,openshift-rosa,openshift-rosa-hcp[]
Cluster administrators
endif::openshift-dedicated,openshift-rosa,openshift-rosa-hcp[]
ifdef::openshift-dedicated,openshift-rosa,openshift-rosa-hcp[]
Administrators with the `dedicated-admin` role
endif::openshift-dedicated,openshift-rosa,openshift-rosa-hcp[]
and Operator catalog maintainers can create and manage custom catalogs packaged using the bundle format on Operator Lifecycle Manager (OLM) in {product-title}.

[IMPORTANT]
====
Kubernetes periodically deprecates certain APIs that are removed in subsequent releases. As a result, Operators are unable to use removed APIs starting with the version of {product-title} that uses the Kubernetes version that removed the API.
====

[role="_additional-resources"]
.Additional resources

* xref:../../operators/understanding/olm-packaging-format.adoc#olm-bundle-format_olm-packaging-format[Bundle format]
* xref:../../operators/understanding/olm-rh-catalogs.adoc#olm-rh-catalogs[Red Hat-provided Operator catalogs]

[id="olm-managing-custom-catalogs-bundle-format-prereqs"]
== Prerequisites

* You have installed the `opm` CLI.

[role="_additional-resources"]
.Additional resources

* xref:../../cli_reference/opm/cli-opm-install.adoc#cli-opm-install[`opm` CLI installation]

[id="olm-managing-custom-catalogs-fb"]
== File-based catalogs

_File-based catalogs_ are the latest iteration of the catalog format in Operator Lifecycle Manager (OLM). It is a plain text-based (JSON or YAML) and declarative config evolution of the earlier SQLite database format, and it is fully backwards compatible.

[IMPORTANT]
====
As of {product-title} 4.11, the default Red Hat-provided Operator catalog releases in the file-based catalog format. The default Red Hat-provided Operator catalogs for {product-title} 4.6 through 4.10 released in the deprecated SQLite database format.

The `opm` subcommands, flags, and functionality related to the SQLite database format are also deprecated and will be removed in a future release. The features are still supported and must be used for catalogs that use the deprecated SQLite database format.

Many of the `opm` subcommands and flags for working with the SQLite database format, such as `opm index prune`, do not work with the file-based catalog format.
ifndef::openshift-dedicated,openshift-rosa,openshift-rosa-hcp[]
For more information about working with file-based catalogs, see "Operator Framework packaging format" and "Mirroring images for a disconnected installation using the oc-mirror plugin".
endif::openshift-dedicated,openshift-rosa,openshift-rosa-hcp[]
ifdef::openshift-dedicated,openshift-rosa,openshift-rosa-hcp[]
For more information about working with file-based catalogs, see "Operator Framework packaging format".
endif::openshift-dedicated,openshift-rosa,openshift-rosa-hcp[]
====

include::modules/olm-creating-fb-catalog-image.adoc[leveloffset=+2]

[role="_additional-resources"]
.Additional resources

* link:https://docs.docker.com/registry/spec/manifest-v2-2/[Docker v2-2]
* xref:../../cli_reference/opm/cli-opm-ref.adoc#cli-opm-ref[`opm` CLI reference]
* xref:../../operators/understanding/olm-packaging-format.adoc#olm-file-based-catalogs_olm-packaging-format[Operator Framework packaging format]
ifndef::openshift-dedicated,openshift-rosa,openshift-rosa-hcp[]
* xref:../../disconnected/installing-mirroring-disconnected.adoc#installing-mirroring-disconnected[Mirroring images for a disconnected installation using the oc-mirror plugin]
endif::openshift-dedicated,openshift-rosa,openshift-rosa-hcp[]

include::modules/olm-filtering-fbc.adoc[leveloffset=+2]

ifndef::openshift-dedicated,openshift-rosa,openshift-rosa-hcp[]
[role="_additional-resources"]
.Additional resources

* xref:../../operators/understanding/olm-packaging-format.adoc#olm-deprecations-schema_olm-packaging-format[Packaging format -> Schemas -> olm.deprecations schema]
* xref:../../disconnected/installing-mirroring-disconnected.adoc#updating-mirror-registry-content[Mirroring images for a disconnected installation using the oc-mirror plugin -> Keeping your mirror registry content updated]
* xref:../../disconnected/using-olm.adoc#olm-creating-catalog-from-index_olm-restricted-networks[Adding a catalog source to a cluster]
endif::openshift-dedicated,openshift-rosa,openshift-rosa-hcp[]

include::modules/olm-managing-custom-catalogs-sqlite.adoc[leveloffset=+1]

include::modules/olm-creating-index-image.adoc[leveloffset=+2]

include::modules/olm-updating-index-image.adoc[leveloffset=+2]

include::modules/olm-pruning-index-image.adoc[leveloffset=+2]

include::modules/olm-catalog-source-and-psa.adoc[leveloffset=+1]

[role="_additional-resources"]
.Additional resources

* xref:../../authentication/understanding-and-managing-pod-security-admission.adoc#understanding-and-managing-pod-security-admission[Understanding and managing pod security admission]

include::modules/olm-migrating-sqlite-catalog-to-fbc.adoc[leveloffset=+2]

[role="_additional-resources"]
.Additional resources

* xref:../../operators/admin/olm-managing-custom-catalogs.adoc#olm-creating-catalog-from-index_olm-managing-custom-catalogs[Adding a catalog source to a cluster]

include::modules/olm-updating-sqlite-catalog-to-a-new-opm-version.adoc[leveloffset=+2]

include::modules/olm-sqlite-catalog-configuring-elevated-permissions.adoc[leveloffset=+2]

include::modules/olm-creating-catalog-from-index.adoc[leveloffset=+1]

[role="_additional-resources"]
.Additional resources

* xref:../../operators/understanding/olm/olm-understanding-olm.adoc#olm-catalogsource_olm-understanding-olm[Operator Lifecycle Manager concepts and resources -> Catalog source]
ifndef::openshift-dedicated,openshift-rosa,openshift-rosa-hcp[]
* xref:../../operators/admin/olm-managing-custom-catalogs.adoc#olm-accessing-images-private-registries_olm-managing-custom-catalogs[Accessing images for Operators from private registries]
// This xref may be relevant to OSD/ROSA, but the topic is not currently included in the OSD and ROSA docs.
* xref:../../openshift_images/managing_images/image-pull-policy.adoc#image-pull-policy[Image pull policy]
endif::openshift-dedicated,openshift-rosa,openshift-rosa-hcp[]

// Exclude from OSD/ROSA - dedicated-admins can't create the necessary secrets to do this procedure.
ifndef::openshift-dedicated,openshift-rosa,openshift-rosa-hcp[]
include::modules/olm-accessing-images-private-registries.adoc[leveloffset=+1]

[role="_additional-resources"]
.Additional resources

* xref:../../cicd/builds/creating-build-inputs.adoc#builds-secrets-overview_creating-build-inputs[What is a secret?]
* xref:../../openshift_images/managing_images/using-image-pull-secrets.adoc#images-update-global-pull-secret_using-image-pull-secrets[Updating the global cluster pull secret]
* xref:../../openshift_images/managing_images/using-image-pull-secrets.adoc#images-allow-pods-to-reference-images-from-secure-registries_using-image-pull-secrets[Allowing pods to reference images from other secured registries]
endif::openshift-dedicated,openshift-rosa,openshift-rosa-hcp[]

// Exclude from OSD/ROSA - dedicated-admins can't do this procedure.
ifndef::openshift-dedicated,openshift-rosa,openshift-rosa-hcp[]
include::modules/olm-restricted-networks-configuring-operatorhub.adoc[leveloffset=+1]

endif::openshift-dedicated,openshift-rosa,openshift-rosa-hcp[]

// Removing custom catalogs can be done as a dedicated-admin, but the steps are different.
ifndef::openshift-dedicated,openshift-rosa,openshift-rosa-hcp[]
include::modules/olm-removing-catalogs.adoc[leveloffset=+1]

endif::openshift-dedicated,openshift-rosa,openshift-rosa-hcp[]
ifdef::openshift-dedicated,openshift-rosa,openshift-rosa-hcp[]
include::modules/sd-olm-removing-catalogs.adoc[leveloffset=+1]

endif::openshift-dedicated,openshift-rosa,openshift-rosa-hcp[]
