Skip to content

Commit 97b90c5

Browse files
authored
Merge pull request #35065 from apinnick/mig-766-proxy-config
MIG-766: proxy config
2 parents eb1c29f + 82cd0b3 commit 97b90c5

10 files changed

+82
-56
lines changed

migrating_from_ocp_3_to_4/advanced-migration-options-3-4.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ This section describes how to migrate your applications with the {mtc-short} API
2929

3030
include::modules/migration-about-migrating-applications-api.adoc[leveloffset=+2]
3131
include::modules/migration-prerequisites.adoc[leveloffset=+2]
32-
include::modules/migration-configuring-proxy-for-dvm.adoc[leveloffset=+3]
32+
include::modules/migration-configuring-proxies.adoc[leveloffset=+2]
3333
include::modules/migration-migrating-applications-api.adoc[leveloffset=+2]
3434

3535
[id="migration-hooks_{context}"]

migrating_from_ocp_3_to_4/installing-3-4.adoc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,9 @@ After you have installed {mtc-short}, you must configure an object storage to us
1919

2020
include::modules/migration-installing-mtc-on-ocp-4.adoc[leveloffset=+1]
2121
include::modules/migration-installing-mtc-on-ocp-3.adoc[leveloffset=+1]
22+
include::modules/migration-configuring-proxies.adoc[leveloffset=+1]
23+
24+
For more information, see xref:../networking/enable-cluster-wide-proxy.adoc#nw-proxy-configure-object_config-cluster-wide-proxy[Configuring the cluster-wide proxy].
2225

2326
[id="configuring-replication-repository_{context}"]
2427
== Configuring a replication repository

migrating_from_ocp_3_to_4/installing-restricted-3-4.adoc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,9 @@ After you have installed {mtc-short}, you must configure an object storage to us
2121

2222
include::modules/migration-installing-mtc-on-ocp-4.adoc[leveloffset=+1]
2323
include::modules/migration-installing-mtc-on-ocp-3.adoc[leveloffset=+1]
24+
include::modules/migration-configuring-proxies.adoc[leveloffset=+1]
25+
26+
For more information, see xref:../networking/enable-cluster-wide-proxy.adoc#nw-proxy-configure-object_config-cluster-wide-proxy[Configuring the cluster-wide proxy].
2427

2528
[id="configuring-replication-repository_{context}"]
2629
== Configuring a replication repository

migrating_from_ocp_3_to_4/migrating-applications-3-4.adoc

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,6 @@ include::modules/migration-prerequisites.adoc[leveloffset=+1]
2727
* link:https://docs.openshift.com/container-platform/3.11/install_config/registry/securing_and_exposing_registry.html#exposing-the-registry[Manually exposing a secure registry for {product-title} 3]
2828
* xref:../migrating_from_ocp_3_to_4/troubleshooting-3-4.adoc#migration-updating-deprecated-internal-images_troubleshooting-3-4[Updating deprecated internal images]
2929

30-
include::modules/migration-configuring-proxy-for-dvm.adoc[leveloffset=+2]
31-
3230
[id="migrating-applications-mtc-web-console_{context}"]
3331
== Migrating your applications by using the {mtc-short} web console
3432

migration_toolkit_for_containers/advanced-migration-options-mtc.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ This section describes how to migrate your applications with the {mtc-short} API
2828

2929
include::modules/migration-about-migrating-applications-api.adoc[leveloffset=+2]
3030
include::modules/migration-prerequisites.adoc[leveloffset=+2]
31-
include::modules/migration-configuring-proxy-for-dvm.adoc[leveloffset=+3]
31+
include::modules/migration-configuring-proxies.adoc[leveloffset=+2]
3232
include::modules/migration-migrating-applications-api.adoc[leveloffset=+2]
3333

3434
[id="migration-hooks_{context}"]

migration_toolkit_for_containers/installing-mtc-restricted.adoc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,9 @@ You can configure the `Migration Controller` custom resource manifest to run the
2020
After you have installed {mtc-short}, you must configure an object storage to use as a replication repository.
2121

2222
include::modules/migration-installing-mtc-on-ocp-4.adoc[leveloffset=+1]
23+
include::modules/migration-configuring-proxies.adoc[leveloffset=+1]
24+
25+
For more information, see xref:../networking/enable-cluster-wide-proxy.adoc#nw-proxy-configure-object_config-cluster-wide-proxy[Configuring the cluster-wide proxy].
2326

2427
[id="configuring-replication-repository_{context}"]
2528
== Configuring a replication repository

migration_toolkit_for_containers/installing-mtc.adoc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,9 @@ By default, the {mtc-short} web console and the `Migration Controller` pod run o
1818
After you have installed {mtc-short}, you must configure an object storage to use as a replication repository.
1919

2020
include::modules/migration-installing-mtc-on-ocp-4.adoc[leveloffset=+1]
21+
include::modules/migration-configuring-proxies.adoc[leveloffset=+1]
22+
23+
For more information, see xref:../networking/enable-cluster-wide-proxy.adoc#nw-proxy-configure-object_config-cluster-wide-proxy[Configuring the cluster-wide proxy].
2124

2225
[id="configuring-replication-repository_{context}"]
2326
== Configuring a replication repository

migration_toolkit_for_containers/migrating-applications-with-mtc.adoc

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ During migration, the {mtc-full} ({mtc-short}) preserves the following namespace
1818
These annotations preserve the UID range, ensuring that the containers retain their file system permissions on the target cluster. There is a risk that the migrated UIDs could duplicate UIDs within an existing or future namespace on the target cluster.
1919

2020
include::modules/migration-prerequisites.adoc[leveloffset=+1]
21-
include::modules/migration-configuring-proxy-for-dvm.adoc[leveloffset=+2]
2221

2322
[id="migrating-applications-mtc-web-console_{context}"]
2423
== Migrating your applications by using the {mtc-short} web console
Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
// Module included in the following assemblies:
2+
//
3+
// * migrating_from_ocp_3_to_4/installing-3-4.adoc
4+
// * migrating_from_ocp_3_to_4/installing-restricted-3-4.adoc
5+
// * migration_toolkit_for_containers/installing-mtc.adoc
6+
// * migration_toolkit_for_containers/installing-mtc-restricted.adoc
7+
8+
[id="migration-configuring-proxies_{context}"]
9+
= Configuring proxies
10+
11+
For {product-title} 3.x and 4.1, you must configure proxies in the `MigrationController` custom resource (CR) manifest after you install the {mtc-short} Operator because these versions do not support a cluster-wide `proxy` object.
12+
13+
For {product-title} 4.2 and later, the {mtc-full} ({mtc-short}) inherits the cluster-wide proxy settings. You can change the proxy parameters if you want to override the cluster-wide proxy settings.
14+
15+
You must configure the proxies to allow the SPDY protocol and to forward the `Upgrade HTTP` header to the API server. Otherwise, an `Upgrade request required` error is displayed. The `MigrationController` CR uses SPDY to run commands within remote pods. The `Upgrade HTTP` header is required in order to open a websocket connection with the API server.
16+
17+
.Direct volume migration
18+
19+
If you are performing a direct volume migration (DVM) from a source cluster behind a proxy, you must configure an Stunnel proxy. Stunnel creates a transparent tunnel between the source and target clusters for the TCP connection without changing the certificates.
20+
21+
DVM supports only one proxy. The source cluster cannot access the route of the target cluster if the target cluster is also behind a proxy.
22+
23+
.Prerequisites
24+
25+
* You must be logged in as a user with `cluster-admin` privileges on all clusters.
26+
27+
.Procedure
28+
29+
. Get the `MigrationController` CR manifest:
30+
+
31+
[source,terminal]
32+
----
33+
$ oc get migrationcontroller <migration_controller> -n openshift-migration
34+
----
35+
36+
. Update the proxy parameters:
37+
+
38+
[source,yaml]
39+
----
40+
apiVersion: migration.openshift.io/v1alpha1
41+
kind: MigrationController
42+
metadata:
43+
name: <migration_controller>
44+
namespace: openshift-migration
45+
...
46+
spec:
47+
stunnel_tcp_proxy: http://<username>:<password>@<ip>:<port> <1>
48+
httpProxy: http://<username>:<password>@<ip>:<port> <2>
49+
httpsProxy: http://<username>:<password>@<ip>:<port> <3>
50+
noProxy: example.com <4>
51+
----
52+
<1> Stunnel proxy URL for direct volume migration.
53+
<2> Proxy URL for creating HTTP connections outside the cluster. The URL scheme must be `http`.
54+
<3> Proxy URL for creating HTTPS connections outside the cluster. If this is not specified, then `httpProxy` is used for both HTTP and HTTPS connections.
55+
<4> Comma-separated list of destination domain names, domains, IP addresses, or other network CIDRs to exclude proxying.
56+
+
57+
Preface a domain with `.` to match subdomains only. For example, `.y.com` matches `x.y.com`, but not `y.com`. Use `*` to bypass proxy for all destinations.
58+
If you scale up workers that are not included in the network defined by the `networking.machineNetwork[].cidr` field from the installation configuration, you must add them to this list to prevent connection issues.
59+
+
60+
This field is ignored if neither the `httpProxy` nor the `httpsProxy` field is set.
61+
62+
. Save the manifest as `migration-controller.yaml`.
63+
. Apply the updated manifest:
64+
+
65+
[source,terminal]
66+
----
67+
$ oc replace -f migration-controller.yaml -n openshift-migration
68+
----

modules/migration-configuring-proxy-for-dvm.adoc

Lines changed: 0 additions & 51 deletions
This file was deleted.

0 commit comments

Comments
 (0)