Creating the image set configuration
Before you can use the oc-mirror plugin v2 to mirror images, you must create an image set configuration file. This image set configuration file defines which Red Hat OpenShift Container Platform releases, Operators, and other images to mirror, along with other configuration settings for the oc-mirror plugin v2.
-
You have created a container image registry credentials file. For instructions, see Configuring credentials that allow images to be mirrored.
-
Create an
ImageSetConfigurationYAML file and modify it to include your required images.ExampleImageSetConfigurationYAML filekind: ImageSetConfiguration apiVersion: mirror.openshift.io/v2alpha1 mirror: platform: channels: - name: stable-4.22minVersion: 4.22.0 maxVersion: 4.22.0 graph: true
operators: - catalog: registry.redhat.io/redhat/redhat-operator-index:v4.22
packages:
- name: aws-load-balancer-operator - name: 3scale-operator - name: node-observability-operator channels: - name: stable additionalImages:
- name: registry.redhat.io/ubi8/ubi:latest - name: registry.redhat.io/ubi9/ubi@sha256:20f695d2a91352d4eaa25107535126727b5945bff38ed36a3e59590f495046f0
mirror.platform.channels.name-
Set the channel to retrieve Red Hat OpenShift Container Platform images from.
mirror.platform.graph-
Add
graph: trueto build and push the graph-data image to the mirror registry. The graph-data image is required to create OpenShift Update Service (OSUS). Thegraph: truefield also generates theUpdateServicecustom resource manifest. Theoccommand-line interface (CLI) can use theUpdateServicecustom resource manifest to create OSUS. For more information, see About the OpenShift Update Service. mirror.operators.catalog-
Set the Operator catalog to retrieve the Red Hat OpenShift Container Platform images from.
mirror.operators.packages-
Specify only certain Operator packages to include in the image set. Remove this field to retrieve all packages in the catalog.
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. mirror.additionalImages-
Specify any additional images to include in image set.
You must use explicit registry hostnames for all images listed under
additionalImages. Without explicit hostnames, the plugin mirrors the images to unexpected target paths.