mirror of
https://github.com/openshift/openshift-docs.git
synced 2026-02-05 12:46:18 +01:00
63 lines
2.7 KiB
Plaintext
63 lines
2.7 KiB
Plaintext
// Module included in the following assemblies:
|
|
//
|
|
// * migrating_from_ocp_3_to_4/advanced-migration-options-3-4.adoc
|
|
// * migration_toolkit_for_containers/advanced-migration-options-mtc.adoc
|
|
|
|
:_mod-docs-content-type: PROCEDURE
|
|
[id="migration-excluding-resources_{context}"]
|
|
= Excluding resources
|
|
|
|
You can exclude resources, for example, image streams, persistent volumes (PVs), or subscriptions, from a {mtc-first} migration plan to reduce the resource load for migration or to migrate images or PVs with a different tool.
|
|
|
|
By default, the {mtc-short} excludes service catalog resources and Operator Lifecycle Manager (OLM) resources from migration. These resources are parts of the service catalog API group and the OLM API group, neither of which is supported for migration at this time.
|
|
|
|
.Procedure
|
|
|
|
. Edit the `MigrationController` custom resource manifest:
|
|
+
|
|
[source,terminal]
|
|
----
|
|
$ oc edit migrationcontroller <migration_controller> -n openshift-migration
|
|
----
|
|
|
|
. Update the `spec` section by adding parameters to exclude specific resources. For those resources that do not have their own exclusion parameters, add the `additional_excluded_resources` parameter:
|
|
+
|
|
[source,yaml]
|
|
----
|
|
apiVersion: migration.openshift.io/v1alpha1
|
|
kind: MigrationController
|
|
metadata:
|
|
name: migration-controller
|
|
namespace: openshift-migration
|
|
spec:
|
|
disable_image_migration: true <1>
|
|
disable_pv_migration: true <2>
|
|
additional_excluded_resources: <3>
|
|
- resource1
|
|
- resource2
|
|
...
|
|
----
|
|
<1> Add `disable_image_migration: true` to exclude image streams from the migration. `imagestreams` is added to the `excluded_resources` list in `main.yml` when the `MigrationController` pod restarts.
|
|
<2> Add `disable_pv_migration: true` to exclude PVs from the migration plan. `persistentvolumes` and `persistentvolumeclaims` are added to the `excluded_resources` list in `main.yml` when the `MigrationController` pod restarts. Disabling PV migration also disables PV discovery when you create the migration plan.
|
|
<3> You can add {product-title} resources that you want to exclude to the `additional_excluded_resources` list.
|
|
|
|
|
|
. Wait two minutes for the `MigrationController` pod to restart so that the changes are applied.
|
|
|
|
. Verify that the resource is excluded:
|
|
+
|
|
[source,terminal]
|
|
----
|
|
$ oc get deployment -n openshift-migration migration-controller -o yaml | grep EXCLUDED_RESOURCES -A1
|
|
----
|
|
+
|
|
The output contains the excluded resources:
|
|
+
|
|
.Example output
|
|
[source,yaml]
|
|
----
|
|
name: EXCLUDED_RESOURCES
|
|
value:
|
|
resource1,resource2,imagetags,templateinstances,clusterserviceversions,packagemanifests,subscriptions,servicebrokers,servicebindings,serviceclasses,serviceinstances,serviceplans,imagestreams,persistentvolumes,persistentvolumeclaims
|
|
----
|