1
0
mirror of https://github.com/openshift/openshift-docs.git synced 2026-02-05 12:46:18 +01:00
Files
openshift-docs/modules/cnf-image-based-upgrade-prep-catalogsource.adoc
2024-07-10 13:30:10 +00:00

44 lines
1.5 KiB
Plaintext

// Module included in the following assemblies:
// * edge_computing/image-based-upgrade/cnf-preparing-for-image-based-upgrade.adoc
:_mod-docs-content-type: PROCEDURE
[id="cnf-image-based-upgrade-prep-catalogsources_{context}"]
= Creating ConfigMap objects of custom catalog sources for the image-based upgrade with {lcao}
You can keep your custom catalog sources after the upgrade by generating a `ConfigMap` object for your catalog sources and adding them to the `spec.extraManifest` field in the `ImageBasedUpgrade` CR.
For more information about catalog sources, see "Catalog source".
.Procedure
. Create a YAML file that contains the `CatalogSource` CR:
+
--
[source,yaml]
----
apiVersion: operators.coreos.com/v1
kind: CatalogSource
metadata:
name: example-catalogsources
namespace: openshift-marketplace
spec:
sourceType: grpc
displayName: disconnected-redhat-operators
image: quay.io/example-org/example-catalog:v1
----
--
. Create the `ConfigMap` object by running the following command:
+
[source,terminal]
----
$ oc create configmap example-catalogsources-cm --from-file=example-catalogsources.yaml=<path_to_catalogsource_cr> -n openshift-lifecycle-agent
----
. Patch the `ImageBasedUpgrade` CR by running the following command:
+
[source,terminal]
----
$ oc patch imagebasedupgrades.lca.openshift.io upgrade \
-p='{"spec": {"extraManifests": [{"name": "example-catalogsources-cm", "namespace": "openshift-lifecycle-agent"}]}}' \
--type=merge -n openshift-lifecycle-agent
----