$ oc patch OperatorHub cluster --type json \
-p '[{"op": "add", "path": "/spec/disableAllDefaultSources", "value": true}]'
After you install a cluster on IBM Cloud® in a disconnected environment, you must complete the postinstallation configuration steps to prepare the cluster for use.
Operator catalogs that source content provided by Red Hat and community projects are configured for the software catalog by default during an OKD installation. In a restricted network environment, you must disable the default catalogs as a cluster administrator.
Operator catalogs that source content provided by Red Hat and community projects are configured for the software catalog by default during an OKD installation.
Disable the sources for the default catalogs by adding disableAllDefaultSources: true to the OperatorHub object:
$ oc patch OperatorHub cluster --type json \
-p '[{"op": "add", "path": "/spec/disableAllDefaultSources", "value": true}]'
|
Alternatively, you can use the web console to manage catalog sources. From the Administration → Cluster Settings → Configuration → OperatorHub page, click the Sources tab, where you can create, update, delete, disable, and enable individual sources. |
Mirroring the OKD content using the oc-mirror OpenShift CLI (oc) plugin creates resources, which include catalogSource-certified-operator-index.yaml and imageContentSourcePolicy.yaml.
The ImageContentSourcePolicy resource associates the mirror registry with the source registry and redirects image pull requests from the online registries to the mirror registry.
The CatalogSource resource is used by Operator Lifecycle Manager (OLM) Classic to retrieve information about the available Operators in the mirror registry, which lets users discover and install Operators.
|
OLM v1 uses the The oc-mirror plugin v1 does not generate For more information on creating and applying |
After you install the cluster, you must install these resources into the cluster.
You have mirrored the image set to the registry mirror in the disconnected environment.
You have access to the cluster as a user with the cluster-admin role.
Log in to the OpenShift CLI as a user with the cluster-admin role.
Apply the YAML files from the results directory to the cluster:
$ oc apply -f ./oc-mirror-workspace/results-<id>/
Verify that the ImageContentSourcePolicy resources were successfully installed:
$ oc get imagecontentsourcepolicy
Verify that the CatalogSource resources were successfully installed:
$ oc get catalogsource --all-namespaces