Este conteúdo não está disponível no idioma selecionado.
Chapter 11. Operators
11.1. Using Operators with MicroShift
You can use Operators with MicroShift to create applications that monitor the running services in your node. Operators can manage applications and their resources, such as deploying a database or message bus. As customized software running inside your node, Operators can be used to implement and automate common operations.
				Operators offer a more localized configuration experience and integrate with Kubernetes APIs and CLI tools such as kubectl and oc. Operators are designed specifically for your applications. Operators enable you to configure components instead of modifying a global configuration file.
			
MicroShift applications are generally expected to be deployed in static environments. However, Operators are available if helpful in your use case. To determine the compatibility of an Operator with MicroShift, check the Operator documentation.
11.1.1. How to use Operators with a MicroShift node
There are two ways to use Operators for your MicroShift node:
11.1.1.1. Manifests for Operators
						Operators can be installed and managed directly by using manifests. You can use the kustomize configuration management tool with MicroShift to deploy an application. Use the same steps to install Operators with manifests.
					
- See Using Kustomize manifests to deploy applications and Using manifests example for details.
11.1.1.2. Operator Lifecycle Manager for Operators
You can also install add-on Operators to a MicroShift node by using Operator Lifecycle Manager (OLM). OLM can be used to manage both custom Operators and Operators that are widely available. Building catalogs is required to use OLM with MicroShift.
- For details, see Using Operator Lifecycle Manager with MicroShift.
11.2. Using Operator Lifecycle Manager with MicroShift
Operator Lifecycle Manager (OLM) is used in MicroShift for installing and running optional add-on Operators. See the following link for more information:
11.2.1. Considerations for using OLM with MicroShift
- Cluster Operators as applied in OpenShift Container Platform are not used in MicroShift.
- You must create your own catalogs for the add-on Operators you want to use with your applications. Catalogs are not provided by default. - 
									Each catalog must have an accessible CatalogSourceadded to a node, so that the OLM catalog Operator can use the catalog for content.
 
- 
									Each catalog must have an accessible 
- You must use the CLI to conduct OLM activities with MicroShift. The console and OperatorHub GUIs are not available. - 
									Use the Operator Package Manager opmCLI with a network-connected node, or for building catalogs for custom Operators that use an internal registry.
- To mirror your catalogs and Operators for disconnected or offline nodes, install the oc-mirror OpenShift CLI plugin.
 
- 
									Use the Operator Package Manager 
Before using an Operator, verify with the provider that the Operator is supported on Red Hat build of MicroShift.
11.2.2. Determining your OLM installation type
You can install the OLM package manager for use with MicroShift 4.15 or newer versions. There are different ways to install OLM for a MicroShift node, depending on your use case.
- 
							You can install the microshift-olmRPM at the same time you install the MicroShift RPM on Red Hat Enterprise Linux (RHEL).
- 
							You can install the microshift-olmon an existing MicroShift 4.20. Restart the MicroShift service after installing OLM for the changes to apply. See Installing the Operator Lifecycle Manager (OLM) from an RPM package.
- You can embed OLM in a Red Hat Enterprise Linux for Edge (RHEL for Edge) image. See Adding the Operator Lifecycle Manager (OLM) service to a blueprint.
11.2.3. Namespace use in MicroShift
					The microshift-olm RPM creates the three default namespaces: one for running OLM, and two for catalog and Operator installation. You can create additional namespaces as needed for your use case.
				
11.2.3.1. Default namespaces
The following table lists the default namespaces and a brief description of how each namespace works.
| Default Namespace | Details | 
| 
										 | The OLM package manager runs in this namespace. | 
| 
										 | 
										The global namespace. Empty by default. To make the catalog source to be available globally to users in all namespaces, set the  | 
| 
										 | 
										The default namespace where Operators run in MicroShift. Operators that reference catalogs in the  | 
11.2.3.2. Custom namespaces
If you want to use a catalog and Operator together in a single namespace, then you must create a custom namespace. After you create the namespace, you must create the catalog in that namespace. All Operators running in the custom namespace must have the same single-namespace watch scope.
11.2.4. About building Operator catalogs
To use Operator Lifecycle Manager (OLM) with MicroShift, you must build custom Operator catalogs that you can then manage with OLM. The standard catalogs that are included with OpenShift Container Platform are not included with MicroShift.
11.2.4.1. File-based Operator catalogs
You can create catalogs for your custom Operators or filter catalogs of widely available Operators. You can combine both methods to create the catalogs needed for your specific use case. To run MicroShift with your own Operators and OLM, make a catalog by using the file-based catalog structure.
- For details, see Managing custom catalogs and Example catalog.
- 
								See also opmCLI reference.
- 
									When adding a catalog source to a cluster, set the securityContextConfigvalue torestrictedin thecatalogSource.yamlfile. Ensure that your catalog can run withrestrictedpermissions.
11.2.5. How to deploy Operators using OLM
After you create and deploy your custom catalog, you must create a Subscription custom resource (CR) that can access the catalog and install the Operators you choose. Where Operators run depends on the namespace in which you create the Subscription CR.
Operators in OLM have a watch scope. For example, some Operators only support watching their own namespace, while others support watching every namespace in the node. All Operators installed in a given namespace must have the same watch scope.
11.2.5.1. Connectivity and OLM Operator deployment
Operators can be deployed anywhere a catalog is running.
- For a node that is connected to the internet, mirroring images is not required. Images can be pulled over the network.
- For restricted networks in which MicroShift has access to an internal network only, images must be mirrored to an internal registry.
- 
								For use cases in which a MicroShift node is completely offline, all images must be embedded into an osbuildblueprint.
11.2.5.2. Adding OLM-based Operators to a networked node using the global namespace
To deploy different operators to different namespaces, use this procedure. For a MicroShift node that has network connectivity, Operator Lifecycle Manager (OLM) can access sources hosted on remote registries. The following procedure lists the basic steps of using configuration files to install an Operator that uses the global namespace.
							To use an Operator installed in a different namespace, or in more than one namespace, make sure that the catalog source and the Subscription CR that references the Operator are running in the openshift-marketplace namespace.
						
Prerequisites
- 
								The OpenShift CLI (oc) is installed.
- Operator Lifecycle Manager (OLM) is installed.
- You have created a custom catalog in the global namespace.
Procedure
- Confirm that OLM is running by using the following command: - oc -n openshift-operator-lifecycle-manager get pod -l app=olm-operator - $ oc -n openshift-operator-lifecycle-manager get pod -l app=olm-operator- Copy to Clipboard Copied! - Toggle word wrap Toggle overflow - Example output - NAME READY STATUS RESTARTS AGE olm-operator-85b5c6786-n6kbc 1/1 Running 0 2m24s - NAME READY STATUS RESTARTS AGE olm-operator-85b5c6786-n6kbc 1/1 Running 0 2m24s- Copy to Clipboard Copied! - Toggle word wrap Toggle overflow 
- Confirm that the OLM catalog Operator is running by using the following command: - oc -n openshift-operator-lifecycle-manager get pod -l app=catalog-operator - $ oc -n openshift-operator-lifecycle-manager get pod -l app=catalog-operator- Copy to Clipboard Copied! - Toggle word wrap Toggle overflow - Example output - NAME READY STATUS RESTARTS AGE catalog-operator-5fc7f857b6-tj8cf 1/1 Running 0 2m33s - NAME READY STATUS RESTARTS AGE catalog-operator-5fc7f857b6-tj8cf 1/1 Running 0 2m33s- Copy to Clipboard Copied! - Toggle word wrap Toggle overflow 
							The following steps assume you are using the global namespace, openshift-marketplace. The catalog must run in the same namespace as the Operator. The Operator must support the AllNamespaces mode.
						
- Create the - CatalogSourceobject by using the following example YAML:- Example catalog source YAML - Copy to Clipboard Copied! - Toggle word wrap Toggle overflow - 1
- The global namespace. Setting themetadata.namespacetoopenshift-marketplaceenables the catalog to run in all namespaces. Subscriptions in any namespace can reference catalogs created in theopenshift-marketplacenamespace.
- 2
- Community Operators are not installed by default with OLM for MicroShift. Listed here for example only.
- 3
- The value ofsecurityContextConfigmust be set torestrictedfor MicroShift.
 
- Apply the - CatalogSourceconfiguration by running the following command:- oc apply -f <catalog_source.yaml> - $ oc apply -f <catalog_source.yaml>- 1 - Copy to Clipboard Copied! - Toggle word wrap Toggle overflow - 1
- Replace<catalog-source.yaml>with your catalog source configuration file name. In this example,catalogsource.yamlis used.
 - Example output - catalogsource.operators.coreos.com/operatorhubio-catalog created - catalogsource.operators.coreos.com/operatorhubio-catalog created- Copy to Clipboard Copied! - Toggle word wrap Toggle overflow 
- To verify that the catalog source is applied, check for the - READYstate by using the following command:- oc describe catalogsources.operators.coreos.com -n openshift-marketplace operatorhubio-catalog - $ oc describe catalogsources.operators.coreos.com -n openshift-marketplace operatorhubio-catalog- Copy to Clipboard Copied! - Toggle word wrap Toggle overflow - Example output - Copy to Clipboard Copied! - Toggle word wrap Toggle overflow - 1
- The status is reported asREADY.
 
- Confirm that the catalog source is running by using the following command: - oc get pods -n openshift-marketplace -l olm.catalogSource=operatorhubio-catalog - $ oc get pods -n openshift-marketplace -l olm.catalogSource=operatorhubio-catalog- Copy to Clipboard Copied! - Toggle word wrap Toggle overflow - Example output - NAME READY STATUS RESTARTS AGE operatorhubio-catalog-x24nh 1/1 Running 0 59s - NAME READY STATUS RESTARTS AGE operatorhubio-catalog-x24nh 1/1 Running 0 59s- Copy to Clipboard Copied! - Toggle word wrap Toggle overflow 
- Create a Subscription CR configuration file by using the following example YAML: - Example Subscription custom resource YAML - Copy to Clipboard Copied! - Toggle word wrap Toggle overflow - 1
- The global namespace. Setting thesourceNamespacevalue toopenshift-marketplaceenables Operators to run in multiple namespaces if the catalog also runs in theopenshift-marketplacenamespace.
 
- Apply the Subscription CR configuration by running the following command: - oc apply -f <subscription_cr.yaml> - $ oc apply -f <subscription_cr.yaml>- 1 - Copy to Clipboard Copied! - Toggle word wrap Toggle overflow - 1
- Replace<subscription_cr.yaml>with your Subscription CR filename.
 - Example output - subscription.operators.coreos.com/my-cert-manager created - subscription.operators.coreos.com/my-cert-manager created- Copy to Clipboard Copied! - Toggle word wrap Toggle overflow 
- You can create a configuration file for the specific Operand you want to use and apply it now.
Verification
- Verify that your Operator is running by using the following command: - oc get pods -n openshift-operators - $ oc get pods -n openshift-operators- 1 - Copy to Clipboard Copied! - Toggle word wrap Toggle overflow - 1
- The namespace from the Subscription CR is used.
 Note- Allow a minute or two for the Operator start. - Example output - NAME READY STATUS RESTARTS AGE cert-manager-7df8994ddb-4vrkr 1/1 Running 0 19s cert-manager-cainjector-5746db8fd7-69442 1/1 Running 0 18s cert-manager-webhook-f858bf58b-748nt 1/1 Running 0 18s - NAME READY STATUS RESTARTS AGE cert-manager-7df8994ddb-4vrkr 1/1 Running 0 19s cert-manager-cainjector-5746db8fd7-69442 1/1 Running 0 18s cert-manager-webhook-f858bf58b-748nt 1/1 Running 0 18s- Copy to Clipboard Copied! - Toggle word wrap Toggle overflow 
11.2.5.3. Adding OLM-based Operators to a networked node in a specific namespace
						Use this procedure if you want to specify a namespace for an Operator, for example, olm-microshift. In this example, the catalog is scoped and available in the global openshift-marketplace namespace. The Operator uses content from the global namespace, but runs only in the olm-microshift namespace. For a MicroShift node that has network connectivity, Operator Lifecycle Manager (OLM) can access sources hosted on remote registries.
					
All of the Operators installed in a specific namespace must have the same watch scope. In this case, the watch scope is OwnNamespace.
Prerequisites
- 
								The OpenShift CLI (oc) is installed.
- Operator Lifecycle Manager (OLM) is installed.
- You have created a custom catalog that is running in the global namespace.
Procedure
- Confirm that OLM is running by using the following command: - oc -n openshift-operator-lifecycle-manager get pod -l app=olm-operator - $ oc -n openshift-operator-lifecycle-manager get pod -l app=olm-operator- Copy to Clipboard Copied! - Toggle word wrap Toggle overflow - Example output - NAME READY STATUS RESTARTS AGE olm-operator-85b5c6786-n6kbc 1/1 Running 0 16m - NAME READY STATUS RESTARTS AGE olm-operator-85b5c6786-n6kbc 1/1 Running 0 16m- Copy to Clipboard Copied! - Toggle word wrap Toggle overflow 
- Confirm that the OLM catalog Operator is running by using the following command: - oc -n openshift-operator-lifecycle-manager get pod -l app=catalog-operator - $ oc -n openshift-operator-lifecycle-manager get pod -l app=catalog-operator- Copy to Clipboard Copied! - Toggle word wrap Toggle overflow - Example output - NAME READY STATUS RESTARTS AGE catalog-operator-5fc7f857b6-tj8cf 1/1 Running 0 16m - NAME READY STATUS RESTARTS AGE catalog-operator-5fc7f857b6-tj8cf 1/1 Running 0 16m- Copy to Clipboard Copied! - Toggle word wrap Toggle overflow 
- Create a namespace by using the following example YAML: - Example namespace YAML - apiVersion: v1 kind: Namespace metadata: name: olm-microshift - apiVersion: v1 kind: Namespace metadata: name: olm-microshift- Copy to Clipboard Copied! - Toggle word wrap Toggle overflow 
- Apply the namespace configuration using the following command: - oc apply -f <ns.yaml> - $ oc apply -f <ns.yaml>- 1 - Copy to Clipboard Copied! - Toggle word wrap Toggle overflow - 1
- Replace<ns.yaml>with the name of your namespace configuration file. In this example,olm-microshiftis used.
 - Example output - namespace/olm-microshift created - namespace/olm-microshift created- Copy to Clipboard Copied! - Toggle word wrap Toggle overflow 
- Create the Operator group YAML by using the following example YAML: - Example Operator group YAML - Copy to Clipboard Copied! - Toggle word wrap Toggle overflow - 1
- For Operators using the global namespace, omit thespec.targetNamespacesfield and values.
 
- Apply the Operator group configuration by running the following command: - oc apply -f <og.yaml> - $ oc apply -f <og.yaml>- 1 - Copy to Clipboard Copied! - Toggle word wrap Toggle overflow - 1
- Replace<og.yaml>with the name of your operator group configuration file.
 - Example output - operatorgroup.operators.coreos.com/og created - operatorgroup.operators.coreos.com/og created- Copy to Clipboard Copied! - Toggle word wrap Toggle overflow 
- Create the - CatalogSourceobject by using the following example YAML:- Example catalog source YAML - Copy to Clipboard Copied! - Toggle word wrap Toggle overflow - 1
- The global namespace. Setting themetadata.namespacetoopenshift-marketplaceenables the catalog to run in all namespaces. Subscriptions CRs in any namespace can reference catalogs created in theopenshift-marketplacenamespace.
- 2
- Community Operators are not installed by default with OLM for MicroShift. Listed here for example only.
- 3
- The value ofsecurityContextConfigmust be set torestrictedfor MicroShift.
 
- Apply the - CatalogSourceconfiguration by running the following command:- oc apply -f <catalog_source.yaml> - $ oc apply -f <catalog_source.yaml>- 1 - Copy to Clipboard Copied! - Toggle word wrap Toggle overflow - 1
- Replace<catalog_source.yaml>with your catalog source configuration file name.
 
- To verify that the catalog source is applied, check for the - READYstate by using the following command:- oc describe catalogsources.operators.coreos.com -n openshift-marketplace operatorhubio-catalog - $ oc describe catalogsources.operators.coreos.com -n openshift-marketplace operatorhubio-catalog- Copy to Clipboard Copied! - Toggle word wrap Toggle overflow - Example output - Copy to Clipboard Copied! - Toggle word wrap Toggle overflow - 1
- The status is reported asREADY.
 
- Confirm that the catalog source is running by using the following command: - oc get pods -n openshift-marketplace -l olm.catalogSource=operatorhubio-catalog - $ oc get pods -n openshift-marketplace -l olm.catalogSource=operatorhubio-catalog- Copy to Clipboard Copied! - Toggle word wrap Toggle overflow - Example output - NAME READY STATUS RESTARTS AGE operatorhubio-catalog-j7sc8 1/1 Running 0 43s - NAME READY STATUS RESTARTS AGE operatorhubio-catalog-j7sc8 1/1 Running 0 43s- Copy to Clipboard Copied! - Toggle word wrap Toggle overflow 
- Create a Subscription CR configuration file by using the following example YAML: - Example Subscription custom resource YAML - Copy to Clipboard Copied! - Toggle word wrap Toggle overflow 
- Apply the Subscription CR configuration by running the following command: - oc apply -f <subscription_cr.yaml> - $ oc apply -f <subscription_cr.yaml>- 1 - Copy to Clipboard Copied! - Toggle word wrap Toggle overflow - 1
- Replace<subscription_cr.yaml>with the name of the Subscription CR configuration file.
 - Example output - subscription.operators.coreos.com/my-gitlab-operator-kubernetes - subscription.operators.coreos.com/my-gitlab-operator-kubernetes- Copy to Clipboard Copied! - Toggle word wrap Toggle overflow 
- You can create a configuration file for the specific Operand you want to use and apply it now.
Verification
- Verify that your Operator is running by using the following command: - oc get pods -n olm-microshift - $ oc get pods -n olm-microshift- 1 - Copy to Clipboard Copied! - Toggle word wrap Toggle overflow - 1
- The namespace from the Subscription CR is used.
 Note- Allow a minute or two for the Operator start. - Example output - NAME READY STATUS RESTARTS AGE gitlab-controller-manager-69bb6df7d6-g7ntx 2/2 Running 0 3m24s - NAME READY STATUS RESTARTS AGE gitlab-controller-manager-69bb6df7d6-g7ntx 2/2 Running 0 3m24s- Copy to Clipboard Copied! - Toggle word wrap Toggle overflow 
11.3. Creating custom Operator catalogs using the oc-mirror plugin
				You can create custom catalogs with widely available Operators and mirror them by using the oc-mirror OpenShift CLI (oc) plugin.
			
11.3.1. Using Red Hat-provided Operator catalogs and mirror registries
					You can filter catalogs and delete images to get specific Operators and mirror them by using the oc-mirror OpenShift CLI (oc) plugin. You can also use Operators in disconnected settings or embedded in a Red Hat Enterprise Linux (RHEL) image.
				
- To understand more about how to configure your systems for mirroring, follow the links in the following "Additional resources" section.
- If you are ready to deploy Operators from Red Hat-provided Operator catalogs, mirror them, or to embed them in a RHEL image, start with the following section, "Inspecting catalog contents by using the oc-mirror plugin."
11.3.2. About the oc-mirror plugin for creating a mirror registry
You can use the oc-mirror OpenShift CLI (oc) plugin with MicroShift to filter and delete images from Operator catalogs. You can then mirror the filtered catalog contents to a mirror registry or use the container images in disconnected or offline deployments.
The procedure to mirror content from Red Hat-hosted registries connected to the internet to a disconnected image registry is the same, independent of the registry you select. After you mirror the contents of your catalog, configure each node to retrieve this content from your mirror registry.
11.3.2.1. Connectivity considerations when populating a mirror registry
When you populate your registry, you can use one of following connectivity scenarios:
- Connected mirroring
- If you have a host that can access both the internet and your mirror registry, but not your node, you can directly mirror the content from that machine.
- Disconnected mirroring
- If you do not have a host that can access both the internet and your mirror registry, you must mirror the images to a file system and then bring that host or removable media into your disconnected environment. Important- A container registry must be reachable by every machine in the node that you provision. Installing, updating, and other operations, such as relocating workloads, fail if the registry is unreachable. 
To avoid problems caused by an unreachable registry, use the following standard practices:
- Run mirror registries in a highly available way.
- Ensure that the mirror registry at least matches the production availability of your node.
11.3.3. Inspecting catalog contents by using the oc-mirror plugin
Use the following example procedure to select a catalog and list OpenShift Container Platform Operators to add to your oc-mirror plugin image set configuration file. You must use oc mirror v1 to selecting a catalog and listing Operators.
If you use your own catalogs and Operators, you can push the images directly to your internal registry.
Prerequisites
- 
							You uninstalled OpenShift CLI (oc).
- You installed the Operator Lifecycle Manager (OLM).
- You installed the oc-mirror plugin.
Procedure
- Get a list of available Red Hat-provided Operator catalogs to filter by running the following command: - oc mirror list operators --version 4.20 --catalogs - $ oc mirror list operators --version 4.20 --catalogs- Copy to Clipboard Copied! - Toggle word wrap Toggle overflow 
- Get a list of Operators in the Red Hat Operators catalog by running the following command: - oc mirror list operators <--catalog=<catalog_source>> - $ oc mirror list operators <--catalog=<catalog_source>>- 1 - Copy to Clipboard Copied! - Toggle word wrap Toggle overflow - 1
- Specifies your catalog source, such asregistry.redhat.io/redhat/redhat-operator-index:v4.20orquay.io/operatorhubio/catalog:latest.
 
- 
							Select an Operator. This example uses the amq-broker-rhel9Operator.
- Optional: To inspect the channels and versions of the Operator you want to filter, enter the following commands: - Get a list of channels by running the following command: - oc mirror list operators --catalog=registry.redhat.io/redhat/redhat-operator-index:v4.20 --package=amq-broker-rhel9 - $ oc mirror list operators --catalog=registry.redhat.io/redhat/redhat-operator-index:v4.20 --package=amq-broker-rhel9- Copy to Clipboard Copied! - Toggle word wrap Toggle overflow 
- Get a list of versions within a channel by running the following command: - oc mirror list operators --catalog=registry.redhat.io/redhat/redhat-operator-index:v4.20 --package=amq-broker-rhel9 --channel=7.13.x - $ oc mirror list operators --catalog=registry.redhat.io/redhat/redhat-operator-index:v4.20 --package=amq-broker-rhel9 --channel=7.13.x- Copy to Clipboard Copied! - Toggle word wrap Toggle overflow 
 
Next steps
- Create and edit an image set configuration file using the information gathered in this procedure.
- Mirror the images from the transformed image set configuration file to a mirror registry or disk.
11.3.4. Creating an image set configuration file
					You must create an ImageSetConfiguration YAML file. This image set configuration file specifies both the Operators to mirror and the configuration settings for the oc-mirror plugin. Edit the contents of the image set configuration file so that the entries are compatible with both MicroShift and the Operator you plan to use.
				
oc mirror v2 uses a cache system instead of metadata. The cache system prevents the need to start the entire mirroring process over when a single step fails. Instead, you can troubleshoot the failed step and the process does not re-mirror images that existed before the failure.
Prerequisites
- You created a container image registry credentials file. For more information, see the following reference: 
Procedure
- Create and edit the - ImageSetConfigurationYAML for MicroShift by using the following example as a guide:- Example edited MicroShift image set configuration file - Copy to Clipboard Copied! - Toggle word wrap Toggle overflow - 1
- Set the Operator catalog to retrieve images from.
- 2
- Specify the Operator packages to include in the image set. Remove this field to retrieve all packages in the catalog.
- 3
- Specify 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>.
- 4
- Specify any additional images to include in the image set. If you do not need to specify additional images, delete this field.
 Important- The - platformfield, related fields, and Helm are not supported by MicroShift.
- 
							Save the updated file as ImageSetConfiguration.yaml.
Next steps
- Use the oc-mirror plugin to mirror an image set directly to a target mirror registry.
- Configure CRI-O.
- Apply the catalog sources to your node.
11.3.4.1. ImageSet configuration parameters for oc-mirror plugin v2
						The oc-mirror plugin v2 requires an image set configuration file that defines what images to mirror. The following table lists the available parameters for the ImageSetConfiguration resource.
					
							Using the minVersion and maxVersion properties to filter for a specific Operator version range can result in a multiple channel heads error. The error message states that there are multiple channel heads. This is because when the filter is applied, the update graph of the Operator is truncated.
						
OLM requires that every Operator channel contains versions that form an update graph with exactly one end point, that is, the latest version of the Operator. When the filter range is applied, that graph can turn into two or more separate graphs or a graph that has more than one end point.
							To avoid this error, do not filter out the latest version of an Operator. If you still run into the error, depending on the Operator, either the maxVersion property must be increased or the minVersion property must be decreased. Because every Operator graph can be different, you might need to adjust these values until the error resolves.
						
| Parameter | Description | Values | 
|---|---|---|
| 
										 | 
										The API version of the  | 
										String Example:  | 
| 
										 | The configuration of the image set. | Object | 
| 
										 | The additional images configuration of the image set. | Array of objects Example: additionalImages: - name: registry.redhat.io/ubi8/ubi:latest  | 
| 
										 | The tag or digest of the image to mirror. | 
										String Example:  | 
| 
										 | List of images with a tag or digest (SHA) to block from mirroring. | 
										Array of strings Example:  | 
| 
										 | The Operators configuration of the image set. | Array of objects Example: operators:
  - catalog: registry.redhat.io/redhat/redhat-operator-index:4.20
    packages:
      - name: elasticsearch-operator
        minVersion: '2.4.0' | 
| 
										 | The Operator catalog to include in the image set. | 
										String Example:  | 
| 
										 | 
										When  | 
										Boolean The default value is  | 
| 
										 | The Operator packages configuration. | Array of objects Example: operators:
  - catalog: registry.redhat.io/redhat/redhat-operator-index:4.20
    packages:
      - name: elasticsearch-operator
        minVersion: '5.2.3-31' | 
| 
										 | The Operator package name to include in the image set. | 
										String Example:  | 
| 
										 | Operator package channel configuration | Object | 
| 
										 | The Operator channel name, unique within a package, to include in the image set. | 
										String Eample:  | 
| 
										 | The highest version of the Operator mirror across all channels in which it exists. | 
										String Example:  | 
| 
										 | The lowest version of the Operator to mirror across all channels in which it exists | 
										String Example:  | 
| 
										 | The highest version of the Operator to mirror across all channels in which it exists. | 
										String Example:  | 
| 
										 | The lowest version of the Operator to mirror across all channels in which it exists. | 
										String Example:  | 
| 
										 | An alternative name and optional namespace hierarchy to mirror the referenced catalog as | 
										String Example:  | 
| 
										 | Path on disk for a template to use to complete catalogSource custom resource generated by oc-mirror plugin v2. | 
										String Example:  | 
| 
										 | 
										An alternative tag to append to the  | 
										String Example:  | 
11.3.4.1.1. DeleteImageSetConfiguration parameters
							To use remove images with the oc-mirror plugin v2, you must use a DeleteImageSetConfiguration.yaml configuration file that defines which images to delete from the mirror registry. The following table lists the available parameters for the DeleteImageSetConfiguration resource.
						
| Parameter | Description | Values | 
|---|---|---|
| 
											 | 
											The API version for the  | 
											String Example:  | 
| 
											 | The configuration of the image set to delete. | Object | 
| 
											 | The additional images configuration of the delete image set. | Array of objects Example: additionalImages: - name: registry.redhat.io/ubi8/ubi:latest  | 
| 
											 | The tag or digest of the image to delete. | 
											String Example:  | 
| 
											 | The Operators configuration of the delete image set. | Array of objects Example: operators:
  - catalog: registry.redhat.io/redhat/redhat-operator-index:{product-version}
    packages:
      - name: elasticsearch-operator
        minVersion: '2.4.0' | 
| 
											 | The Operator catalog to include in the delete image set. | 
											String Example:  | 
| 
											 | When true, deletes the full catalog, Operator package, or Operator channel. | 
											Boolean The default value is  | 
| 
											 | Operator packages configuration | Array of objects Example: operators:
  - catalog: registry.redhat.io/redhat/redhat-operator-index:{product-version}
    packages:
      - name: elasticsearch-operator
        minVersion: '5.2.3-31' | 
| 
											 | The Operator package name to include in the delete image set. | 
											String Example:  | 
| 
											 | Operator package channel configuration | Object | 
| 
											 | The Operator channel name, unique within a package, to include in the delete image set. | 
											String Example:  | 
| 
											 | The highest version of the Operator to delete within the selected channel. | 
											String Example:  | 
| 
											 | The lowest version of the Operator to delete within the selection in which it exists. | 
											String Example:  | 
| 
											 | The highest version of the Operator to delete across all channels in which it exists. | 
											String Example:  | 
| 
											 | The lowest version of the Operator to delete across all channels in which it exists. | 
											String Example:  | 
11.3.5. Mirroring from mirror to mirror
You can use the oc-mirror plugin to mirror an image set directly to a target mirror registry that is accessible during image set creation.
Prerequisites
- You have access to the internet to get the required container images.
- 
							You installed the OpenShift CLI (oc).
- 
							You installed the oc-mirrorCLI plugin.
- You created the image set configuration file.
Procedure
- Mirror the images from the specified image set configuration to a specified registry by running the following command: - oc-mirror --config imageset-config.yaml --workspace file://<emphasis><v2_workspace></emphasis> \ docker://<emphasis><remote_registry></emphasis> --v2 - $ oc-mirror --config imageset-config.yaml --workspace file://<emphasis><v2_workspace></emphasis> \- 1 - docker://<emphasis><remote_registry></emphasis> --v2- 2 - Copy to Clipboard Copied! - Toggle word wrap Toggle overflow - 1
- You must use the--workspaceflag for the mirror-to-mirror process. Replace <v2_workspace> with the directory you want to use to store custom resources for the mirroring process.
- 2
- Replace <remote_registry> with the name of the registry to mirror the image set file to. The registry must start withdocker://. If you specify a top-level namespace for the mirror registry, you must also use this same namespace on later executions.
 - Example output - Rendering catalog image "registry.example.com/redhat/redhat-operator-index:v{ocp-version}" with file-based catalog- Rendering catalog image "registry.example.com/redhat/redhat-operator-index:v{ocp-version}" with file-based catalog- Copy to Clipboard Copied! - Toggle word wrap Toggle overflow Important- You must use the - ImageDigestMirrorSetYAML file as reference content for manual configuration of CRI-O in MicroShift. You cannot apply the resource directly into a MicroShift node.
Verification
- List the contents of the - cluster-resourcessubdirectory by running the following command:- ls <v2_workspace>/working-dir/cluster-resources/ - $ ls <v2_workspace>/working-dir/cluster-resources/- 1 - Copy to Clipboard Copied! - Toggle word wrap Toggle overflow - 1
- Replace <v2_workspace> with the directory you used to store custom resources for the mirroring process.
 
Next steps
- 
							Convert the ImageDigestMirrorSetYAML content for use in manually configuring CRI-O.
- If required, mirror the images from mirror to disk for disconnected or offline use.
Troubleshooting
11.3.6. Configuring CRI-O for using a registry mirror for Operators
					You must transform the ImageDigestMirrorSet YAML file created with the oc-mirror plugin into a format that is compatible with the CRI-O container runtime configuration used by MicroShift.
				
Prerequisites
- 
							The OpenShift CLI (oc) is installed.
- You installed Operator Lifecycle Manager (OLM).
- You installed the oc-mirror plugin.
- 
							You installed the yqbinary.
- 
							The ImageDigestMirrorSetandCatalogSourceYAML files are available in thecluster-resourcessubdirectory.
Procedure
- Confirm the contents of the - ImageDigestMirrorSetYAML file by running the following command:- cat <v2_workspace>/working-dir/cluster-resources/imagedigestmirrorset.yaml - $ cat <v2_workspace>/working-dir/cluster-resources/imagedigestmirrorset.yaml- 1 - Copy to Clipboard Copied! - Toggle word wrap Toggle overflow - 1
- Replace <v2_workspace> with the directory name that you used when you generated mirroring resources.
 - Example output - Copy to Clipboard Copied! - Toggle word wrap Toggle overflow 
- Transform the - imagedigestmirrorset.yamlinto a format ready for CRI-O configuration by running the following command:- Copy to Clipboard Copied! - Toggle word wrap Toggle overflow - Example output - [[registry]] prefix = "registry.redhat.io/amq7" location = "registry.example.com/amq7" mirror-by-digest-only = true insecure = true- [[registry]] prefix = "registry.redhat.io/amq7" location = "registry.example.com/amq7" mirror-by-digest-only = true insecure = true- Copy to Clipboard Copied! - Toggle word wrap Toggle overflow 
- Add the output to the CRI-O configuration file in the - /etc/containers/registries.conf.d/directory:- Example - crio-config.yamlmirror configuration file- Copy to Clipboard Copied! - Toggle word wrap Toggle overflow - 1
- Specify the hostname and port of your mirror registry server, for examplemicroshift-quay:8443.
 
- Apply the CRI-O configuration changes by restarting MicroShift with the following command: - sudo systemctl restart crio - $ sudo systemctl restart crio- Copy to Clipboard Copied! - Toggle word wrap Toggle overflow 
11.3.7. Installing a custom catalog created with the oc-mirror plugin
					After you mirror your image set to the mirror registry, you must apply the generated CatalogSource custom resource (CR) into the node. Operator Lifecycle Manager (OLM) uses the CatalogSource CR to retrieve information about the available Operators in the mirror registry. You must then create and apply a subscription CR to subscribe to your custom catalog.
				
Prerequisites
- You mirrored the image set to your registry mirror.
- You added image reference information to the CRI-O container runtime configuration.
Procedure
- Apply the catalog source configuration file from the results directory to create the catalog source object by running the following command: - oc apply -f ./<v2_workspace>/working-dir/cluster-resources/catalogSource-cs-redhat-catalog.yaml - $ oc apply -f ./<v2_workspace>/working-dir/cluster-resources/catalogSource-cs-redhat-catalog.yaml- 1 - Copy to Clipboard Copied! - Toggle word wrap Toggle overflow - 1
- Replace <v2_workspace> with the directory you used to store custom resources for the mirroring process.
 - Example output - catalogsource.operators.coreos.com/cs-redhat-catalog created - catalogsource.operators.coreos.com/cs-redhat-catalog created- Copy to Clipboard Copied! - Toggle word wrap Toggle overflow 
- For reference, see the following example file: - Example catalog source configuration file - Copy to Clipboard Copied! - Toggle word wrap Toggle overflow - 1
- Specifies the global namespace. Setting themetadata.namespacetoopenshift-marketplaceenables the catalog to reference catalogs in all namespaces. Subscriptions in any namespace can reference catalogs created in theopenshift-marketplacenamespace.
 
- Verify that the - CatalogSourceresources were successfully installed by running the following command:- oc get catalogsource --all-namespaces - $ oc get catalogsource --all-namespaces- Copy to Clipboard Copied! - Toggle word wrap Toggle overflow - Example output - NAMESPACE NAME DISPLAY TYPE PUBLISHER AGE openshift-marketplace certified-operators Certified Operators grpc Red Hat 37m openshift-marketplace community-operators Community Operators grpc Red Hat 37m openshift-marketplace redhat-marketplace Red Hat Marketplace grpc Red Hat 37m openshift-marketplace redhat-catalog Red Hat Catalog grpc Red Hat 37m - NAMESPACE NAME DISPLAY TYPE PUBLISHER AGE openshift-marketplace certified-operators Certified Operators grpc Red Hat 37m openshift-marketplace community-operators Community Operators grpc Red Hat 37m openshift-marketplace redhat-marketplace Red Hat Marketplace grpc Red Hat 37m openshift-marketplace redhat-catalog Red Hat Catalog grpc Red Hat 37m- Copy to Clipboard Copied! - Toggle word wrap Toggle overflow 
- Verify that the catalog source is running by using the following command: - oc get pods -n openshift-marketplace - $ oc get pods -n openshift-marketplace- Copy to Clipboard Copied! - Toggle word wrap Toggle overflow - Example output - NAME READY STATUS RESTARTS AGE cs-redhat-catalog-4227b 2/2 Running 0 2m5s - NAME READY STATUS RESTARTS AGE cs-redhat-catalog-4227b 2/2 Running 0 2m5s- Copy to Clipboard Copied! - Toggle word wrap Toggle overflow 
- Create a - SubscriptionCR, similar to the following example:- Example - SubscriptionCR- Copy to Clipboard Copied! - Toggle word wrap Toggle overflow 
- Apply the Subscription CR configuration by running the following command: - oc apply -f ./<subscription_cr.yaml> - $ oc apply -f ./<subscription_cr.yaml>- 1 - Copy to Clipboard Copied! - Toggle word wrap Toggle overflow - 1
- Specify the name of your subscription in <subscription_cr.yaml>, for exampleamq—broker-subscription-cr.yaml.
 - Example output - subscription.operators.coreos.com/amq-broker created - subscription.operators.coreos.com/amq-broker created- Copy to Clipboard Copied! - Toggle word wrap Toggle overflow 
11.4. Adding OLM-based Operators to a disconnected node
You can use OLM-based Operators in disconnected situations by embedding them in a Red Hat Enterprise Linux for Edge (RHEL for Edge) image.
11.4.1. About adding OLM-based Operators to a disconnected node
For Operators that are installed on disconnected nodes, Operator Lifecycle Manager (OLM) by default cannot access sources hosted on remote registries because those remote sources require full internet connectivity. Therefore, you must mirror the remote registries to a highly available container registry.
The following steps are required to use OLM-based Operators in disconnected situations:
- Include OLM in the container image list for your mirror registry.
- 
							Configure the system to use your mirror registry by updating your CRI-O configuration directly. ImageContentSourcePolicyis not supported in MicroShift.
- 
							Add a CatalogSourceobject to the node so that the OLM catalog Operator can use the local catalog on the mirror registry.
- Ensure that MicroShift is installed to run in a disconnected capacity.
- Ensure that the network settings are configured to run in disconnected mode.
After enabling OLM in a disconnected node, you can continue to use your internet-connected workstation to keep your local catalog sources updated as newer versions of Operators are released.
11.4.1.1. Performing a dry run
You can use oc-mirror to perform a dry run, without actually mirroring any images. A dry run means you can review the list of images to be mirrored. You can catch any errors with your image set configuration early by using a dry run, or use the generated list of images with other tools to conduct mirroring.
Prerequisites
- You have access to the internet to obtain the necessary container images.
- 
								You installed the OpenShift CLI (oc).
- You installed the oc-mirror CLI plugin.
- You created the image set configuration file.
Procedure
- Run the - oc mirrorcommand with the- --dry-runflag to perform a dry run:- oc-mirror --config <ImageSetConfig.yaml> docker://localhost:5000 --workspace file://<outm2m> --dry-run --v2 - $ oc-mirror --config <ImageSetConfig.yaml> docker://localhost:5000 --workspace file://<outm2m> --dry-run --v2- Copy to Clipboard Copied! - Toggle word wrap Toggle overflow - where: - ImageSetConfig.yaml
- Specifies the name of the image set configuration file that you created.
- docker://localhost:5000
- 
											Specifies the mirror registry. Nothing is mirrored to this registry when you use the --dry-runflag.
- --workspace file://<outm2m>
- Insert the address of the workspace path.
- --dry-run
- The dry run flag generates the dry run artifacts and not an actual image set file.
- --v2
- Specifies oc mirror v2. - Example output - Copy to Clipboard Copied! - Toggle word wrap Toggle overflow 
 
- Review the - mapping.txtfile that was generated by running the following command:- cat wspace/working-dir/dry-run/mapping.txt - $ cat wspace/working-dir/dry-run/mapping.txt- Copy to Clipboard Copied! - Toggle word wrap Toggle overflow - Example output - docker://registry.redhat.io/amq8/amq-broker-rhel9@sha256:47fd4ce2533496828aba37bd1f9715e2164d5c90bd0fc6b25e7e0786d723bf01=docker://mirror.com/amq8/amq-broker-rhel9:sha256-47fd4ce2533496828aba37bd1f9715e2164d5c90bd0fc6b25e7e0786d723bf01 docker://registry.redhat.io/amq8/amq-broker-init-rhel9@sha256:9cc48eecf1442ae04b8543fa5d4381a13bc2831390850828834d387006d1342b=docker://mirror.com/amq7/amq-broker-init-rhel9:sha256-9cc48eecf1442ae04b8543fa5d4381a13bc2831390850828834d387006d1342b docker://registry.redhat.io/amq8/amq-broker-rhel9@sha256:bb6fbd68475a7852b4d99eea6c4ab313f9267da7963162f0d75375d7063409e7=docker://mirror.com/amq8/amq-broker-rhel9:sha256-bb6fbd68475a7852b4d99eea6c4ab313f9267da7963162f0d75375d7063409e7 docker://registry.redhat.io/amq8/amq-broker-rhel9@sha256:d42d713da0ce6806fdc6492b6342586783e6865a82a8647d3c4288439b1751ee=docker://mirror.com/amq8/amq-broker-rhel9:sha256-d42d713da0ce6806fdc6492b6342586783e6865a82a8647d3c4288439b1751ee docker://registry.redhat.io/amq8/amq-broker-init-rhel9@sha256:ffffa9875f0379e9373f89f05eb06e5a193273bb04bc3aa5f85b044357b79098=docker://mirror.com/amq8/amq-broker-init-rhel9:sha256-ffffa9875f0379e9373f89f05eb06e5a193273bb04bc3aa5f85b044357b79098 - docker://registry.redhat.io/amq8/amq-broker-rhel9@sha256:47fd4ce2533496828aba37bd1f9715e2164d5c90bd0fc6b25e7e0786d723bf01=docker://mirror.com/amq8/amq-broker-rhel9:sha256-47fd4ce2533496828aba37bd1f9715e2164d5c90bd0fc6b25e7e0786d723bf01 docker://registry.redhat.io/amq8/amq-broker-init-rhel9@sha256:9cc48eecf1442ae04b8543fa5d4381a13bc2831390850828834d387006d1342b=docker://mirror.com/amq7/amq-broker-init-rhel9:sha256-9cc48eecf1442ae04b8543fa5d4381a13bc2831390850828834d387006d1342b docker://registry.redhat.io/amq8/amq-broker-rhel9@sha256:bb6fbd68475a7852b4d99eea6c4ab313f9267da7963162f0d75375d7063409e7=docker://mirror.com/amq8/amq-broker-rhel9:sha256-bb6fbd68475a7852b4d99eea6c4ab313f9267da7963162f0d75375d7063409e7 docker://registry.redhat.io/amq8/amq-broker-rhel9@sha256:d42d713da0ce6806fdc6492b6342586783e6865a82a8647d3c4288439b1751ee=docker://mirror.com/amq8/amq-broker-rhel9:sha256-d42d713da0ce6806fdc6492b6342586783e6865a82a8647d3c4288439b1751ee docker://registry.redhat.io/amq8/amq-broker-init-rhel9@sha256:ffffa9875f0379e9373f89f05eb06e5a193273bb04bc3aa5f85b044357b79098=docker://mirror.com/amq8/amq-broker-init-rhel9:sha256-ffffa9875f0379e9373f89f05eb06e5a193273bb04bc3aa5f85b044357b79098- Copy to Clipboard Copied! - Toggle word wrap Toggle overflow 
11.4.1.2. Getting catalogs and Operator container image references
After performing a dry run with the oc-mirror plugin to review the list of images that you want to mirror, you must get all of the container image references, then format the output for adding to an image builder blueprint.
For catalogs made for proprietary Operators, you can format image references for the image builder blueprint without using the following procedure.
Prerequisites
- You have a catalog index for the Operators you want to use.
- 
								You have installed the jqCLI tool.
- You are familiar with image builder blueprint files.
- You have an image builder blueprint TOML file.
Procedure
- Parse the catalog - index.jsonfile to get the image references that you need to include in the image builder blueprint. You can use either the unfiltered catalog or you can filter out images that cannot be mirrored:- Parse the unfiltered catalog - index.jsonfile to get the image references by running the following command:- jq -r --slurp '.[] | select(.relatedImages != null) | "[[containers]]\nsource = \"" + .relatedImages[].image + "\"\n"' ./oc-mirror-workspace/src/catalogs/registry.redhat.io/redhat/redhat-operator-index/v4.20/index/index.json - jq -r --slurp '.[] | select(.relatedImages != null) | "[[containers]]\nsource = \"" + .relatedImages[].image + "\"\n"' ./oc-mirror-workspace/src/catalogs/registry.redhat.io/redhat/redhat-operator-index/v4.20/index/index.json- Copy to Clipboard Copied! - Toggle word wrap Toggle overflow 
- If you want to filter out images that cannot be mirrored, filter and parse the catalog - index.jsonfile by running the following command:- jq -r --slurp '.[] | select(.relatedImages != null) | .relatedImages[] | select(.name | contains("ppc") or contains("s390x") | not) | "[[containers]]\\nsource = \\"" + .image + "\\"\\n"' ./oc-mirror-workspace/src/catalogs/registry.redhat.io/redhat/redhat-operator-index/v4.20/index/index.json- $ jq -r --slurp '.[] | select(.relatedImages != null) | .relatedImages[] | select(.name | contains("ppc") or contains("s390x") | not) | "[[containers]]\\nsource = \\"" + .image + "\\"\\n"' ./oc-mirror-workspace/src/catalogs/registry.redhat.io/redhat/redhat-operator-index/v4.20/index/index.json- Copy to Clipboard Copied! - Toggle word wrap Toggle overflow Note- This step uses the AMQ Broker Operator as an example. You can add other criteria to the - jqcommand for further filtering as required by your use case.- Example image-reference output - Copy to Clipboard Copied! - Toggle word wrap Toggle overflow Important- For mirrored and disconnected use cases, ensure that all of the sources filtered from your catalog - index.jsonfile are digests. If any of the sources use tags instead of digests, the Operator installation fails. Tags require an internet connection.
 
- View the - imageset-config.yamlto get the catalog image reference for the- CatalogSourcecustom resource (CR) by running the following command:- cat imageset-config.yaml - $ cat imageset-config.yaml- Copy to Clipboard Copied! - Toggle word wrap Toggle overflow - Example output - Copy to Clipboard Copied! - Toggle word wrap Toggle overflow - 1
- Use the value in themirror.catalogcatalog image reference for the followingjqcommand to get the image digest. In this example, <registry.redhat.io/redhat/redhat-operator-index:v4.20>.
 
- Get the SHA of the catalog index image by running the following command: - skopeo inspect docker://<registry.redhat.io/redhat/redhat-operator-index:v{product-version}> | jq .Digest- $ skopeo inspect docker://<registry.redhat.io/redhat/redhat-operator-index:v{product-version}> | jq .Digest- 1 - Copy to Clipboard Copied! - Toggle word wrap Toggle overflow - 1
- Use the value in themirror.catalogcatalog image reference for thejqcommand to get the image digest. In this example, <registry.redhat.io/redhat/redhat-operator-index:v4.20>.
 - Example output - "sha256:7a76c0880a839035eb6e896d54ebd63668bb37b82040692141ba39ab4c539bc6" - "sha256:7a76c0880a839035eb6e896d54ebd63668bb37b82040692141ba39ab4c539bc6"- Copy to Clipboard Copied! - Toggle word wrap Toggle overflow 
- To get ready to add the image references to your image builder blueprint file, format the catalog image reference by using the following example: - [[containers]] source = "registry.redhat.io/redhat/redhat-operator-index@sha256:7a76c0880a839035eb6e896d54ebd63668bb37b82040692141ba39ab4c539bc6" - [[containers]] source = "registry.redhat.io/redhat/redhat-operator-index@sha256:7a76c0880a839035eb6e896d54ebd63668bb37b82040692141ba39ab4c539bc6"- Copy to Clipboard Copied! - Toggle word wrap Toggle overflow 
- Add the image references from all of the previous steps to the image builder blueprint. - Generated image builder blueprint example snippet - Copy to Clipboard Copied! - Toggle word wrap Toggle overflow - 1
- References for all non-optional MicroShift RPM packages using the same version compatible with themicroshift-release-infoRPM.
- 2
- References for automatically enabling MicroShift on system startup and applying default networking settings.
- 3
- References for all non-optional MicroShift container images necessary for a disconnected deployment.
- 4
- References for the catalog index.
 
11.4.1.3. Applying catalogs and Operators in a disconnected-deployment RHEL for Edge image
After you have created a RHEL for Edge image for a disconnected environment and configured MicroShift networking settings for disconnected use, you can configure the namespace and create catalog and Operator custom resources (CR) for running your Operators.
Prerequisites
- You have a RHEL for Edge image.
- Networking is configured for disconnected use.
- You completed the oc-mirror plugin dry run procedure.
Procedure
- Create a - CatalogSourcecustom resource (CR), similar to the following example:- Example - my-catalog-source-cr.yamlfile- Copy to Clipboard Copied! - Toggle word wrap Toggle overflow - 1
- The global namespace. Setting themetadata.namespacetoopenshift-marketplaceenables the catalog to run in all namespaces. Subscriptions in any namespace can reference catalogs created in theopenshift-marketplacenamespace.
 Note- The default pod security admission definition for - openshift-marketplaceis- baseline, therefore a catalog source custom resource (CR) created in that namespace does not require a- spec.grpcPodConfig.securityContextConfigvalue to be set. You can set a- legacyor- restrictedvalue if required for the namespace and Operators you want to use.
- Add the SHA of the catalog index commit to the Catalog Source (CR), similar to the following example: - Example namespace - spec.imageconfiguration- Copy to Clipboard Copied! - Toggle word wrap Toggle overflow - 1
- The SHA of the image commit. Use the same SHA you added to the image builder blueprint.
 Important- You must use the SHA instead of a tag in your catalog CR or the pod fails to start. 
- Apply the YAML file from the oc-mirror plugin dry run results directory to the node by running the following command: - oc apply -f ./oc-mirror-workspace/results-1708508014/catalogSource-cs-redhat-operator-index.yaml - $ oc apply -f ./oc-mirror-workspace/results-1708508014/catalogSource-cs-redhat-operator-index.yaml- Copy to Clipboard Copied! - Toggle word wrap Toggle overflow - Example output - catalogsource.operators.coreos.com/cs-redhat-operator-index created - catalogsource.operators.coreos.com/cs-redhat-operator-index created- Copy to Clipboard Copied! - Toggle word wrap Toggle overflow 
- Verify that the - CatalogSourceresources were successfully installed by running the following command:- oc get catalogsource --all-namespaces - $ oc get catalogsource --all-namespaces- Copy to Clipboard Copied! - Toggle word wrap Toggle overflow 
- Verify that the catalog source is running by using the following command: - oc get pods -n openshift-marketplace - $ oc get pods -n openshift-marketplace- Copy to Clipboard Copied! - Toggle word wrap Toggle overflow - Example output - NAME READY STATUS RESTARTS AGE cs-redhat-operator-index-4227b 2/2 Running 0 2m5s - NAME READY STATUS RESTARTS AGE cs-redhat-operator-index-4227b 2/2 Running 0 2m5s- Copy to Clipboard Copied! - Toggle word wrap Toggle overflow 
- Create a - SubscriptionCR, similar to the following example:- Example - my-subscription-cr.yamlfile- Copy to Clipboard Copied! - Toggle word wrap Toggle overflow 
- Apply the - SubscriptionCR by running the following command:- oc apply -f ./<my-subscription-cr.yaml> - $ oc apply -f ./<my-subscription-cr.yaml>- 1 - Copy to Clipboard Copied! - Toggle word wrap Toggle overflow - 1
- Specify the name of yourSubscriptionCR, such asmy-subscription-cr.yaml.
 - Example output - subscription.operators.coreos.com/amq-broker created - subscription.operators.coreos.com/amq-broker created- Copy to Clipboard Copied! - Toggle word wrap Toggle overflow