You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
== Use case: Including the shortest {product-title} upgrade path
15
16
16
-
The following `ImageSetConfiguration` file uses a registry storage backend and includes helm charts and an additional Red Hat Universal Base Image (UBI).
17
+
The following `ImageSetConfiguration` file uses a local storage backend and includes all {product-title} versions along the shortest upgrade path from the minimum version of `4.11.37` to the maximum version of `4.12.15`.
== Use case: Including all versions of {product-title} from a minimum to the latest
40
+
41
+
The following `ImageSetConfiguration` file uses a registry storage backend and includes all {product-title} versions starting at a minimum version of `4.10.10` to the latest version in the channel.
42
+
43
+
On every invocation of oc-mirror with this image set configuration, the latest release of the `stable-4.10` channel is evaluated, so running oc-mirror at regular intervals ensures that you automatically receive the latest releases of {product-title} images.
44
+
45
+
.Example `ImageSetConfiguration` file
46
+
[source,yaml]
47
+
----
48
+
apiVersion: mirror.openshift.io/v1alpha2
49
+
kind: ImageSetConfiguration
50
+
storageConfig:
51
+
registry:
52
+
imageURL: example.com/mirror/oc-mirror-metadata
53
+
skipTLS: false
54
+
mirror:
55
+
platform:
56
+
channels:
57
+
- name: stable-4.10
58
+
minVersion: 4.10.10
45
59
----
46
60
61
+
// Updated:
62
+
// - Added a note below about the maxVersion
63
+
// - Added a note about not necessarily getting all versions in the range
== Use case: Including Operator versions from a minimum to the latest
50
67
51
-
The following `ImageSetConfiguration` file uses a local storage backend and includes only the Red Hat Advanced Cluster Security for Kubernetes Operator, versions starting at 3.68.0 and later in the `latest` channel.
68
+
The following `ImageSetConfiguration` file uses a local storage backend and includes only the Red Hat Advanced Cluster Security for Kubernetes Operator, versions starting at 4.0.1 and later in the `stable` channel.
69
+
70
+
[NOTE]
71
+
====
72
+
When you specify a minimum or maximum version range, you might not receive all Operator versions in that range.
73
+
74
+
By default, oc-mirror excludes any versions that are skipped or replaced by a newer version in the Operator Lifecycle Manager (OLM) specification. Operator versions that are skipped might be affected by a CVE or contain bugs. Use a newer version instead. For more information on skipped and replaced versions, see link:https://olm.operatorframework.io/docs/concepts/olm-architecture/operator-catalog/creating-an-update-graph/[Creating an update graph with OLM].
75
+
76
+
To receive all Operator versions in a specified range, you can set the `mirror.operators.full` field to `true`.
== Use case: Including the shortest {product-title} upgrade path
97
+
[NOTE]
98
+
====
99
+
To specify a maximum version instead of the latest, set the `mirror.operators.packages.channels.maxVersion` field.
100
+
====
74
101
75
-
The following `ImageSetConfiguration` file uses a local storage backend and includes all {product-title} versions along the shortest upgrade path from the minimum version of `4.11.37` to the maximum version of `4.12.15`.
The following `ImageSetConfiguration` file uses a local storage backend and includes the Nutanix CSI Operator, the OpenShift Update Service (OSUS) graph image, and an additional Red Hat Universal Base Image (UBI).
== Use case: Including the default Operator channel
97
136
98
-
The following `ImageSetConfiguration` file uses a registry storage backend and includes all {product-title} versions starting at a minimum version of `4.10.10` to the latest version in the channel.
137
+
The following `ImageSetConfiguration` file includes the `stable-5.7` and `stable` channels for the OpenShift Elasticsearch Operator. Even if only the packages from the `stable-5.7` channel are needed, the `stable` channel must also be included in the `ImageSetConfiguration` file, because it is the default channel for the Operator. You must always include the default channel for the Operator package even if you do not use the bundles in that channel.
99
138
100
-
On every invocation of oc-mirror with this image set configuration, the latest release of the `stable-4.10` channel is evaluated, so running oc-mirror at regular intervals ensures that you automatically receive the latest releases of {product-title} images.
139
+
[TIP]
140
+
====
141
+
You can find the default channel by running the following command: `oc mirror list operators --catalog=<catalog_name> --package=<package_name>`.
== Use case: Including an entire catalog (all versions)
121
167
122
-
The following `ImageSetConfiguration` file uses a local storage backend and includes only an example Operator, versions starting at `1.0.0` through `2.0.0` in the `stable` channel.
168
+
The following `ImageSetConfiguration` file sets the `mirror.operators.full` field to `true` to include all versions for an entire Operator catalog.
123
169
124
-
This allows you to only mirror a specific version range of a particular Operator. As time progresses, you can use these settings to adjust the version to newer releases, for example when you no longer have version `1.0.0` running anywhere anymore. In this scenario, you can increase the `minVersion` to something newer, for example `1.5.0`. When oc-mirror runs again with the updated version range, it automatically detects that any releases older than `1.5.0` are no longer required and deletes those from the registry to conserve storage space.
== Use case: Including an entire catalog (channel heads only)
190
+
191
+
The following `ImageSetConfiguration` file includes the channel heads for an entire Operator catalog.
192
+
193
+
By default, for each Operator in the catalog, oc-mirror includes the latest Operator version (channel head) from the default channel. If you want to mirror all Operator versions, and not just the channel heads, you must set the `mirror.operators.full` field to `true`.
194
+
195
+
This example also uses the `targetCatalog` field to specify an alternative namespace and name to mirror the catalog as.
The following `ImageSetConfiguration` file uses a local storage backend and includes the Nutanix CSI Operator, the OpenShift Update Service (OSUS) graph image, and an additional Red Hat Universal Base Image (UBI).
== Use case: Including arbitrary images and helm charts
216
+
217
+
The following `ImageSetConfiguration` file uses a registry storage backend and includes helm charts and an additional Red Hat Universal Base Image (UBI).
<1> Set the back-end location to save the image set metadata to. This location can be a registry or local directory. It is required to specify `storageConfig` values.
64
65
<2> Optionally, include an {product-title} release to mirror from `registry.redhat.io`.
65
66
<3> Specify the absolute path to the location of the OCI catalog on disk. The path must start with `oci://` when using the OCI feature.
66
-
<4> Optionally, specify additional Operator catalogs to pull from a registry.
67
-
<5> Optionally, specify additional images to pull from a registry.
67
+
<4> Optionally, specify an alternative namespace and name to mirror the catalog as.
68
+
<5> Optionally, specify additional Operator catalogs to pull from a registry.
69
+
<6> Optionally, specify additional images to pull from a registry.
68
70
69
71
. Run the `oc mirror` command to mirror the OCI catalog to a target mirror registry:
0 commit comments