1
0
mirror of https://github.com/openshift/openshift-docs.git synced 2026-02-05 21:46:22 +01:00
Files
openshift-docs/modules/migration-excluding-resources.adoc
2021-06-10 13:14:29 +03:00

71 lines
3.0 KiB
Plaintext

// Module included in the following assemblies:
//
// * migrating_from_ocp_3_to_4/migrating-applications-3-4.adoc
// * migration-toolkit-for-containers/migrating-applications-with-mtc
[id="migration-excluding-resources_{context}"]
= Excluding resources from a migration plan
You can exclude resources, for example, image streams, persistent volumes (PVs), or subscriptions, from a {mtc-full} ({mtc-short}) 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 a parameter to exclude specific resources or by adding a resource to the `excluded_resources` parameter if it does not have its own exclusion 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>
...
excluded_resources: <3>
- imagetags
- templateinstances
- clusterserviceversions
- packagemanifests
- subscriptions
- servicebrokers
- servicebindings
- serviceclasses
- serviceinstances
- serviceplans
- operatorgroups
- events
----
<1> Add `disable_image_migration: true` to exclude image streams from the migration. Do not edit the `excluded_resources` parameter. `imagestreams` is added to `excluded_resources` when the `MigrationController` pod restarts.
<2> Add `disable_pv_migration: true` to exclude PVs from the migration plan. Do not edit the `excluded_resources` parameter. `persistentvolumes` and `persistentvolumeclaims` are added to `excluded_resources` 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 to the `excluded_resources` list. Do not delete the default excluded resources. These resources are problematic to migrate and must be excluded.
. 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:
imagetags,templateinstances,clusterserviceversions,packagemanifests,subscriptions,servicebrokers,servicebindings,serviceclasses,serviceinstances,serviceplans,imagestreams,persistentvolumes,persistentvolumeclaims
----