Skip to content

Commit f0abe00

Browse files
Shubha Narayananopenshift-cherrypick-robot
authored andcommitted
oc mirror list support
1 parent ad72fa7 commit f0abe00

3 files changed

Lines changed: 21 additions & 18 deletions

File tree

modules/microshift-oc-mirror-list-ops-catalogs.adoc

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
= Inspecting catalog contents by using the oc-mirror plugin
88

99
[role="_abstract"]
10-
Use the following example procedure to select a catalog and list Operators to add to your oc-mirror plugin image set configuration file. You must use `oc mirror` v1 to select a catalog and list Operators.
10+
Use the following example procedure to select a catalog and list Operators to add to your oc-mirror plugin image set configuration file.
1111

1212
[NOTE]
1313
====
@@ -26,14 +26,14 @@ If you use your own catalogs and Operators, you can push the images directly to
2626
+
2727
[source,terminal,subs="attributes+"]
2828
----
29-
$ oc mirror list operators --version {product-version} --catalogs
29+
$ oc mirror list operators --version {product-version} --catalogs --v2
3030
----
3131

3232
. Get a list of Operators in the Red Hat Operators catalog by running the following command:
3333
+
3434
[source,terminal]
3535
----
36-
$ oc mirror list operators <--catalog=<catalog_source>>
36+
$ oc mirror list operators --catalog=<catalog_source> --v2
3737
----
3838
+
3939
Replace `<catalog_source>` with your catalog source, such as `registry.redhat.io/redhat/redhat-operator-index:v{product-version}` or `quay.io/operatorhubio/catalog:latest`.
@@ -46,13 +46,13 @@ Replace `<catalog_source>` with your catalog source, such as `registry.redhat.io
4646
+
4747
[source,terminal,subs="attributes+"]
4848
----
49-
$ oc mirror list operators --catalog=registry.redhat.io/redhat/redhat-operator-index:v{product-version} --package=amq-broker-rhel9
49+
$ oc mirror list operators --catalog=registry.redhat.io/redhat/redhat-operator-index:v{product-version} --package=amq-broker-rhel9 --v2
5050
----
5151
.. Get a list of versions within a channel by running the following command:
5252
+
5353
[source,terminal,subs="attributes+"]
5454
----
55-
$ oc mirror list operators --catalog=registry.redhat.io/redhat/redhat-operator-index:v{product-version} --package=amq-broker-rhel9 --channel=7.13.x
55+
$ oc mirror list operators --catalog=registry.redhat.io/redhat/redhat-operator-index:v{product-version} --package=amq-broker-rhel9 --channel=7.13.x --v2
5656
----
5757

5858
.Next steps

modules/oc-mirror-building-image-set-config-v2.adoc

Lines changed: 11 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -36,24 +36,22 @@ mirror:
3636
- name: aws-load-balancer-operator
3737
- name: 3scale-operator
3838
- name: node-observability-operator
39+
channels:
40+
- name: stable
3941
additionalImages: <5>
4042
- name: registry.redhat.io/ubi8/ubi:latest
4143
- name: registry.redhat.io/ubi9/ubi@sha256:20f695d2a91352d4eaa25107535126727b5945bff38ed36a3e59590f495046f0
4244
----
43-
<1> Set the channel to retrieve {product-title} images from.
44-
<2> Add `graph: true` to build and push the graph-data image to the mirror registry.
45-
The graph-data image is required to create OpenShift Update Service (OSUS).
46-
The `graph: true` field also generates the `UpdateService` custom resource manifest.
47-
The `oc` command-line interface (CLI) can use the `UpdateService` custom resource manifest to create OSUS.
48-
For more information, see _About the OpenShift Update Service_.
49-
<3> Set the Operator catalog to retrieve the {product-title} images from.
50-
<4> Specify only certain Operator packages to include in the image set. Remove this field to retrieve all packages in the catalog.
51-
<5> Specify any additional images to include in image set.
45+
+
46+
47+
`mirror.platform.channels.name`:: Set the channel to retrieve {product-title} images from.
48+
`mirror.platform.graph`:: Add `graph: true` to build and push the graph-data image to the mirror registry. The graph-data image is required to create OpenShift Update Service (OSUS). The `graph: true` field also generates the `UpdateService` custom resource manifest. The `oc` command-line interface (CLI) can use the `UpdateService` custom resource manifest to create OSUS. For more information, see _About the OpenShift Update Service_.
49+
`mirror.operators.catalog`:: Set the Operator catalog to retrieve the {product-title} images from.
50+
`mirror.operators.packages`:: Specify only certain Operator packages to include in the image set. Remove this field to retrieve all packages in the catalog.
51+
`mirror.operators.packages.channels.name`:: Specifies only certain channels of the Operator packages to include in the image set. You must always include the default channel for the Operator package even if you do not use the bundles in that channel. You can find the default channel by running the following command: `oc mirror list operators --catalog=<catalog_name> --package=<package_name> --v2`.
52+
`mirror.additionalImages`:: Specify any additional images to include in image set.
5253
+
5354
[NOTE]
5455
====
55-
In oc-mirror plugin v2, you must use explicit registry hostnames for all images listed under `additionalImages`. Otherwise, images are mirrored to incorrect target paths.
56+
You must use explicit registry hostnames for all images listed under `additionalImages`. Without explicit hostnames, the plugin mirrors the images to unexpected target paths.
5657
====
57-
58-
// Are there more relevant example version numbers we can use in the example above?
59-
// Also, are there any other callouts that would be helpful for users here?

modules/oc-mirror-imageset-config-parameters-v2.adoc

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -226,6 +226,11 @@ Example: `elasticsearch-operator`
226226

227227
|`mirror.operators.packages.channels.name`
228228
|The Operator channel name, unique within a package, to include in the image set.
229+
+
230+
[NOTE]
231+
====
232+
You must use explicit registry hostnames for all images listed under `additionalImages`. Without explicit hostnames, the plugin mirrors the images to unexpected target paths.
233+
====
229234
|String
230235
Example: `fast` or `stable-v4.15`
231236

0 commit comments

Comments
 (0)