<commit_before>// Module included in the following assemblies:
//
// * operators/admin/olm-restricted-networks.adoc
// * operators/admin/olm-managing-custom-catalogs.adoc

ifdef::openshift-origin[]
:catalog-name: catalog
:index-image-pullspec: quay.io/operatorhubio/catalog:latest
:index-image: catalog:latest
:registry-image: quay.io/openshift/origin-operator-registry:4.9.0
:package1: couchdb-operator
:package2: eclipse-che
:package3: etcd
endif::[]
ifndef::openshift-origin[]
:catalog-name: redhat-operators
:index-image-pullspec: registry.redhat.io/redhat/redhat-operator-index:v{product-version}
:index-image: redhat-operator-index:v{product-version}
:registry-image: registry.redhat.io/openshift4/ose-operator-registry:v4.9
:package1: advanced-cluster-management
:package2: jaeger-product
:package3: quay-operator
endif::[]

[id="olm-pruning-index-image_{context}"]
= Pruning a SQLite-based index image

An index image, based on the Operator bundle format, is a containerized snapshot of an Operator catalog. You can prune an index of all but a specified list of packages, which creates a copy of the source index containing only the Operators that you want.

ifeval::["{context}" != "olm-managing-custom-catalogs"]
When configuring Operator Lifecycle Manager (OLM) to use mirrored content on restricted network {product-title} clusters, use this pruning method if you want to only mirror a subset of Operators from the default catalogs.

For the steps in this procedure, the target registry is an existing mirror registry that is accessible by your workstation with unrestricted network access. This example also shows pruning the index image for the default `{catalog-name}` catalog, but the process is the same for any index image.
endif::[]

.Prerequisites

ifeval::["{context}" != "olm-managing-custom-catalogs"]
* Workstation with unrestricted network access
endif::[]
* `podman` version 1.9.3+
* link:https://github.com/fullstorydev/grpcurl[`grpcurl`]
* `opm` version 1.18.0+
* Access to a registry that supports
link:https://docs.docker.com/registry/spec/manifest-v2-2/[Docker v2-2]<commit_msg>BZ:1922741 - adding alternative to grpcurl command<commit_after>// Module included in the following assemblies:
//
// * operators/admin/olm-restricted-networks.adoc
// * operators/admin/olm-managing-custom-catalogs.adoc

ifdef::openshift-origin[]
:catalog-name: catalog
:index-image-pullspec: quay.io/operatorhubio/catalog:latest
:index-image: catalog:latest
:registry-image: quay.io/openshift/origin-operator-registry:4.9.0
:package1: couchdb-operator
:package2: eclipse-che
:package3: etcd
endif::[]
ifndef::openshift-origin[]
:catalog-name: redhat-operators
:index-image-pullspec: registry.redhat.io/redhat/redhat-operator-index:v{product-version}
:index-image: redhat-operator-index:v{product-version}
:registry-image: registry.redhat.io/openshift4/ose-operator-registry:v4.9
:package1: advanced-cluster-management
:package2: jaeger-product
:package3: quay-operator
endif::[]

[id="olm-pruning-index-image_{context}"]
= Pruning a SQLite-based index image

An index image, based on the Operator bundle format, is a containerized snapshot of an Operator catalog. You can prune an index of all but a specified list of packages, which creates a copy of the source index containing only the Operators that you want.

ifeval::["{context}" != "olm-managing-custom-catalogs"]
When configuring Operator Lifecycle Manager (OLM) to use mirrored content on restricted network {product-title} clusters, use this pruning method if you want to only mirror a subset of Operators from the default catalogs.

For the steps in this procedure, the target registry is an existing mirror registry that is accessible by your workstation with unrestricted network access. This example also shows pruning the index image for the default `{catalog-name}` catalog, but the process is the same for any index image.
endif::[]

.Prerequisites

ifeval::["{context}" != "olm-managing-custom-catalogs"]
* Workstation with unrestricted network access
endif::[]
* `podman` version 1.9.3+
* link:https://github.com/fullstorydev/grpcurl[`grpcurl`] (third-party command-line tool)
* `opm` version 1.18.0+
* Access to a registry that supports
link:https://docs.docker.com/registry/spec/manifest-v2-2/[Docker v2-2]
{'fraction_non_alphanumeric': 0.11243293678563097, 'fraction_numerical': 0.012362957779332866, 'mean_word_length': 5.546564885496183, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 4, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3501882', 'n_tokens_mistral': 1337, 'n_tokens_neox': 1277, 'n_words': 405}