mirror of
https://github.com/openshift/openshift-docs.git
synced 2026-02-06 06:46:26 +01:00
65 lines
2.7 KiB
Plaintext
65 lines
2.7 KiB
Plaintext
// Module included in the following assemblies:
|
|
// * migration/migrating_3_4/migrating-applications-with-cam-3-4.adoc
|
|
// * migration/migrating_4_1_4/migrating-applications-with-cam-4-1-4.adoc
|
|
// * migration/migrating_4_2_4/migrating-applications-with-cam-4-2-4.adoc
|
|
[id='migration-excluding-resources_{context}']
|
|
= Excluding resources from a migration plan
|
|
|
|
You can exclude resources, for example, ImageStreams, persistent volumes (PVs), or subscriptions, from a migration plan in order to reduce the load or to migrate images or PVs with a different tool.
|
|
|
|
.Procedure
|
|
|
|
. Edit the Migration Controller CR:
|
|
+
|
|
[source,terminal]
|
|
----
|
|
$ oc edit migrationcontroller -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
|
|
----
|
|
<1> Add `disable_image_migration: true` to exclude imagestreams from the migration. Do not edit the `excluded_resources` parameter. `imagestreams` is added to `excluded_resources` when the Migration Controller 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 Migration Controller 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 any of the default excluded resources. These resources are known to be problematic for migration.
|
|
|
|
. Wait two minutes for the Migration Controller 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, as shown in the following example:
|
|
+
|
|
[source,yaml]
|
|
----
|
|
- name: EXCLUDED_RESOURCES
|
|
value:
|
|
imagetags,templateinstances,clusterserviceversions,packagemanifests,subscriptions,servicebrokers,servicebindings,serviceclasses,serviceinstances,serviceplans,imagestreams,persistentvolumes,persistentvolumeclaims
|
|
----
|