Skip to content

Commit c6ea9c0

Browse files
authored
Merge pull request #62155 from adellape/updating_fbc
2 parents 2597bae + 1fb583b commit c6ea9c0

File tree

4 files changed

+10
-33
lines changed

4 files changed

+10
-33
lines changed

installing/disconnected_install/installing-mirroring-installation-images.adoc

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,9 @@ Mirroring Operator catalogs for use with disconnected clusters has the following
9494

9595
* Workstation with unrestricted network access.
9696
* `podman` version 1.9.3 or later.
97+
* If you want to filter, or _prune_, an existing catalog and selectively mirror only a subset of Operators, see the following sections:
98+
** xref:../../cli_reference/opm/cli-opm-install.adoc#cli-opm-install[Installing the opm CLI]
99+
** xref:../../operators/admin/olm-managing-custom-catalogs.adoc#olm-filtering-fbc_olm-managing-custom-catalogs[Updating or filtering a file-based catalog image]
97100
ifndef::openshift-origin[]
98101
* If you want to mirror a Red Hat-provided catalog, run the following command on your workstation with unrestricted network access to authenticate with `registry.redhat.io`:
99102
+
@@ -133,6 +136,7 @@ include::modules/olm-mirroring-catalog-post.adoc[leveloffset=+2]
133136
.Additional resources
134137

135138
* xref:../../post_installation_configuration/preparing-for-users.adoc#post-install-mirrored-catalogs[Populating OperatorHub from mirrored Operator catalogs]
139+
* xref:../../operators/admin/olm-managing-custom-catalogs.adoc#olm-filtering-fbc_olm-managing-custom-catalogs[Updating or filtering a file-based catalog image]
136140

137141
[id="next-steps_installing-mirroring-installation-images"]
138142
== Next steps

modules/olm-filtering-fbc.adoc

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@ endif::[]
1111

1212
:_content-type: PROCEDURE
1313
[id="olm-filtering-fbc_{context}"]
14-
= Filtering a file-based catalog image
14+
= Updating or filtering a file-based catalog image
1515

16-
You can use the `opm` CLI to filter, or prune, a catalog image that uses the file-based catalog format. By extracting and updating the contents of an existing catalog image, you can remove one or more Operator packages from the catalog, and then rebuild the image as an updated version.
16+
You can use the `opm` CLI to update or filter (also known as prune) a catalog image that uses the file-based catalog format. By extracting and modifying the contents of an existing catalog image, you can update, add, or remove one or more Operator package entries from the catalog. You can then rebuild the image as an updated version of the catalog.
1717

1818
[NOTE]
1919
====
@@ -46,14 +46,14 @@ $ opm render <registry>/<namespace>/<catalog_image_name>:<tag> \
4646
Alternatively, you can use the `-o json` flag to output in JSON format.
4747
====
4848

49-
. Modify the contents of the resulting `index.yaml` file to remove one or more Operator packages.
49+
. Modify the contents of the resulting `index.yaml` file to your specifications by updating, adding, or removing one or more Operator package entries.
5050
+
5151
[IMPORTANT]
5252
====
5353
After a bundle has been published in a catalog, assume that one of your users has installed it. Ensure that all previously published bundles in a catalog have an update path to the current or newer channel head to avoid stranding users that have that version installed.
5454
====
5555
+
56-
The following example lists a set of `olm.package`, `olm.channel`, and `olm.bundle` blobs which must be deleted to remove an Operator package from the catalog:
56+
For example, if you wanted to remove an Operator package, the following example lists a set of `olm.package`, `olm.channel`, and `olm.bundle` blobs which must be deleted to remove the package from the catalog:
5757
+
5858
.Example removed entries
5959
[%collapsible]
@@ -152,4 +152,4 @@ $ podman push <registry>/<namespace>/<catalog_image_name>:<tag>
152152
+
153153
For more information, see "Adding a catalog source to a cluster" in the "Additional resources" of this section.
154154
155-
. After the catalog source is in a *READY* state, navigate to the *Operators* -> *OperatorHub* page and check that the Operator package that you removed no longer appears.
155+
. After the catalog source is in a *READY* state, navigate to the *Operators* -> *OperatorHub* page and check that the changes you made are reflected in the list of Operators.

modules/olm-updating-index-image.adoc

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
// Module included in the following assemblies:
22
//
33
// * operators/admin/olm-managing-custom-catalogs.adoc
4-
// * operators/admin/olm-restricted-network.adoc
54

65
ifdef::openshift-origin[]
76
:index-image: catalog
@@ -17,9 +16,6 @@ endif::[]
1716
After configuring OperatorHub to use a catalog source that references a custom index image, cluster administrators can keep the available Operators on their cluster up to date by adding bundle images to the index image.
1817

1918
You can update an existing index image using the `opm index add` command.
20-
ifeval::["{context}" == "olm-restricted-networks"]
21-
For restricted networks, the updated content must also be mirrored again to the cluster.
22-
endif::[]
2319

2420
.Prerequisites
2521

@@ -74,22 +70,6 @@ $ opm index add \
7470
$ podman push <registry>/<namespace>/<existing_index_image>:<updated_tag>
7571
----
7672

77-
ifeval::["{context}" == "olm-restricted-networks"]
78-
. Follow the steps in the _Mirroring an Operator catalog_ procedure again to mirror the updated content. However, when you get to the step about creating the `ImageContentSourcePolicy` (ICSP) object, use the `oc replace` command instead of the `oc create` command. For example:
79-
+
80-
[source,terminal,subs="attributes+"]
81-
----
82-
$ oc replace -f ./manifests-{index-image}-<random_number>/imageContentSourcePolicy.yaml
83-
----
84-
+
85-
This change is required because the object already exists and must be updated.
86-
+
87-
[NOTE]
88-
====
89-
Normally, the `oc apply` command can be used to update existing objects that were previously created using `oc apply`. However, due to a known issue regarding the size of the `metadata.annotations` field in ICSP objects, the `oc replace` command must be used for this step currently.
90-
====
91-
endif::[]
92-
9373
. After Operator Lifecycle Manager (OLM) automatically polls the index image referenced in the catalog source at its regular interval, verify that the new packages are successfully added:
9474
+
9575
[source,terminal]

operators/admin/olm-restricted-networks.adoc

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -74,11 +74,4 @@ include::modules/olm-creating-catalog-from-index.adoc[leveloffset=+1]
7474

7575
* xref:../../operators/admin/olm-managing-custom-catalogs.adoc#olm-accessing-images-private-registries_olm-managing-custom-catalogs[Accessing images for Operators from private registries]
7676
* xref:../../operators/understanding/olm/olm-understanding-olm.adoc#olm-catalogsource-image-template_olm-understanding-olm[Image template for custom catalog sources]
77-
* xref:../../openshift_images/managing_images/image-pull-policy.adoc#image-pull-policy[Image pull policy]
78-
79-
include::modules/olm-updating-index-image.adoc[leveloffset=+1]
80-
81-
[role="_additional-resources"]
82-
.Additional resources
83-
84-
* xref:../../operators/admin/olm-restricted-networks.adoc#olm-mirror-catalog_olm-restricted-networks[Mirroring an Operator catalog]
77+
* xref:../../openshift_images/managing_images/image-pull-policy.adoc#image-pull-policy[Image pull policy]

0 commit comments

Comments
 (0)