Skip to content

Commit fa915ae

Browse files
committed
OSSM-9383: Apply conditions to cluster-wide migration tasks
1 parent c3837f2 commit fa915ae

5 files changed

+188
-33
lines changed

migrating/cluster-wide/ossm-migrating-cluster-wide.adoc

Lines changed: 24 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -31,13 +31,14 @@ include::modules/ossm-control-plane-configuration-migration-requirements.adoc[le
3131
3232
include::modules/ossm-cluster-wide-migration-methods.adoc[leveloffset=+1]
3333

34-
// The following tasks are for migration using the Istio revision label
34+
// This sets the context to build the tasks for cluster-wide migration using the Istio revision label
35+
:context: cw-revision
36+
3537
include::modules/ossm-migrating-a-cluster-wide-deployment-using-the-istio-revision-label.adoc[leveloffset=+1]
3638

3739
include::modules/ossm-migrating-workloads-using-the-istio-revision-label.adoc[leveloffset=+2]
3840

39-
[id="next-steps-istio-revision_{context}"]
40-
== Next steps
41+
.Next steps
4142

4243
If you are using gateways, you must migrate them before you complete the migration process.
4344

@@ -47,13 +48,14 @@ If you are not using gateways, and have verified your cluster-wide migration, yo
4748

4849
* xref:../../migrating/done/ossm-migrating-complete.adoc#ossm-migrating-complete[Completing the Migration]
4950
50-
//The following tasks are for migrating using the Istio revision label with cert-manager
51-
include::modules/ossm-migrating-a-cluster-wide-deployment-using-the-istio-revision-label-with-cert-manager.adoc[leveloffset=+1]
51+
// This sets the context to build the tasks for cluster-wide migration using the Istio revision label with cert-manager tasks
52+
:context: cw-revision-cm
53+
54+
include::modules/ossm-migrating-a-cluster-wide-deployment-using-the-istio-revision-label.adoc[leveloffset=+1]
5255

53-
include::modules/ossm-migrating-workloads-using-the-istio-revision-label-with-cert-manager.adoc[leveloffset=+2]
56+
include::modules/ossm-migrating-workloads-using-the-istio-revision-label.adoc[leveloffset=+2]
5457

55-
[id="next-steps-istio-revision-with-cert-manager_{context}"]
56-
== Next steps
58+
.Next steps
5759

5860
If you are using gateways, you must migrate them before you complete the migration process.
5961

@@ -63,14 +65,14 @@ If you are not using gateways, and have verified your cluster-wide migration, yo
6365

6466
* xref:../../migrating/done/ossm-migrating-complete.adoc#ossm-migrating-complete[Completing the Migration]
6567
66-
// The following tasks are for migrating using the Istio injection label
68+
// This sets the context to build the tasks for cluster-wide migration using the Istio injection label
69+
:context: cw-injection
6770

6871
include::modules/ossm-migrating-a-cluster-wide-deployment-using-the-istio-injection-label.adoc[leveloffset=+1]
6972

7073
include::modules/ossm-migrating-workloads-using-the-istio-injection-label.adoc[leveloffset=+2]
7174

72-
[id="next-steps-istio-injection_{context}"]
73-
== Next steps
75+
.Next steps
7476

7577
If you are using gateways, you must migrate them before you complete the migration process.
7678

@@ -80,8 +82,7 @@ If you are not using gateways, and have verified your cluster-wide migration, cr
8082

8183
include::modules/ossm-creating-a-default-revision-tag-and-relabeling-the-namespaces.adoc[leveloffset=+2]
8284

83-
[id="next-steps-istio-injection-relabel_{context}"]
84-
== Next steps
85+
.Next steps
8586

8687
You can proceed to complete the migration and remove {SMProduct} 2 resources.
8788

@@ -92,14 +93,14 @@ You can proceed to complete the migration and remove {SMProduct} 2 resources.
9293
Before creating a default revision tag and relabelling the namespaces, you must migrate all remaining workload namespaces, including gateways.
9394
====
9495

95-
// The following tasks are for migration using the Istio injection label with cert-manager
96+
// This sets the context to build the tasks for cluster-wide migration using the Istio injection label with cert-manager
97+
:context: cw-injection-cm
9698

97-
include::modules/ossm-migrating-a-cluster-wide-deployment-using-the-istio-injection-label-with-cert-manager.adoc[leveloffset=+1]
99+
include::modules/ossm-migrating-a-cluster-wide-deployment-using-the-istio-injection-label.adoc[leveloffset=+1]
98100

99-
include::modules/ossm-migrating-workloads-using-the-istio-injection-label-with-cert-manager.adoc[leveloffset=+2]
101+
include::modules/ossm-migrating-workloads-using-the-istio-injection-label.adoc[leveloffset=+2]
100102

101-
[id="next-steps-istio-injection-with-cert-manager_{context}"]
102-
== Next steps
103+
.Next steps
103104

104105
If you are using gateways, you must migrate them before you complete the migration process.
105106

@@ -114,12 +115,13 @@ Before creating a default revision tag and relabelling the namespaces, you must
114115

115116
include::modules/ossm-creating-a-default-revision-tag-and-relabeling-the-namespaces-with-cert-manager.adoc[leveloffset=+2]
116117

117-
//Te following tasks are for migration using the simple migration method
118+
:context: ossm-migrating-cluster-wide
119+
120+
//The following tasks are for migration using the simple migration method
118121
include::modules/ossm-migrating-a-cluster-wide-deployment-using-the-simple-migration-method.adoc[leveloffset=+1]
119122
include::modules/ossm-migrating-workloads-using-the-simple-migration-method.adoc[leveloffset=+2]
120123

121-
[id="next-steps-simple-migration_{context}"]
122-
== Next steps
124+
.Next steps
123125

124126
If you are using gateways, you must migrate them before you complete the migration process.
125127

@@ -133,4 +135,4 @@ If you are not using gateways, you can complete your migration.
133135
[id="additional-resources_{context}"]
134136
== Additional resources
135137

136-
* xref:../../install/ossm-sidecar-injection.adoc#ossm-identifying-revision-name_ossm-sidecar-injection[Identifying the revision name]
138+
* xref:../../install/ossm-sidecar-injection.adoc#ossm-identifying-revision-name_ossm-sidecar-injection[Identifying the revision name]

modules/ossm-migrating-a-cluster-wide-deployment-using-the-istio-injection-label.adoc

Lines changed: 64 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,18 @@
22
//
33
// * service-mesh-docs-main/migrating/cluster-wide/ossm-migrating-cluster-wide.adoc
44

5+
ifeval::["{context}" == "cw-injection"]
6+
:ossm-cluster-wide-istio-injection:
7+
endif::[]
8+
ifeval::["{context}" == "cw-injection-cm"]
9+
:ossm-cert-manager-istio-injection:
10+
endif::[]
11+
512
:_mod-docs-content-type: PROCEDURE
613
[id="ossm-migrating-a-cluster-wide-deployment-using-the-istio-injection-label_{context}"]
7-
= Migrating a cluster-wide deployment by using the istio injection label
14+
//= Migrating a cluster-wide deployment by using the Istio injection label
15+
ifdef::ossm-cluster-wide-istio-injection[= Migrating a cluster-wide deployment by using the Istio injection label]
16+
ifdef::ossm-cert-manager-istio-injection[= Migrating a cluster-wide deployment by using the Istio injection label with cert-manager]
817

918
You can perform a canary upgrade with the gradual migration of data plane namespaces for a cluster-wide deployment by using the `istio-injection=enabled` label and the `default` revision tag.
1019

@@ -21,11 +30,57 @@ The `bookinfo` application is used as an example for the `Istio` resource. For m
2130
* You have the {SMProduct} 3 Operator installed.
2231
* You have created an `IstioCNI` resource.
2332
* You have installed the `istioctl` tool.
33+
ifdef::ossm-cluster-wide-istio-injection[]
2434
* You are running a cluster-wide Service Mesh control plane resource.
35+
endif::[]
36+
ifdef::ossm-cert-manager-istio-injection[]
37+
* You are using the cert-manager and istio-csr tools in a cluster-wide deployment.
38+
* Your {SMProduct} {SMv2Version} `ServiceMeshControlPlane` resource is configured with the cert-manager tool
39+
endif::[]
2540
* You have installed the `bookinfo` application.
2641
2742
.Procedure
2843

44+
ifdef::ossm-cert-manager-istio-injection[]
45+
. Confirm that your {SMProduct} 2 `ServiceMeshControlPlane` resource is configured with the cert-manager tool.
46+
+
47+
.Example `ServiceMeshControlPlane` cert-manager configuration
48+
[source,yaml]
49+
----
50+
apiVersion: maistra.io/v2
51+
kind: ServiceMeshControlPlane
52+
metadata:
53+
name: basic
54+
namespace: istio-system
55+
spec:
56+
...
57+
security:
58+
certificateAuthority:
59+
cert-manager:
60+
address: cert-manager-istio-csr.istio-system.svc:443
61+
type: cert-manager
62+
dataPlane:
63+
mtls: true
64+
identity:
65+
type: ThirdParty
66+
manageNetworkPolicy: false
67+
----
68+
69+
. Update the `istio-csr` deployment to include your {SMProduct} 3 control plane by running the following command:
70+
+
71+
[source,terminal]
72+
----
73+
helm upgrade cert-manager-istio-csr jetstack/cert-manager-istio-csr \
74+
--install \
75+
--reuse-values \
76+
--namespace istio-system \
77+
--wait \
78+
--set "app.istio.revisions={basic,ossm-3-v1-24-3}" <1>
79+
----
80+
+
81+
<1> The `app.istio.revisions` field must include your {SMProduct} 3.0 control plane revision _before_ you create your `Istio` resource so that proxies can properly communicate with the {SMProduct} 3.0 control plane.
82+
endif::[]
83+
2984
. Identify the namespaces that contain a 2.6 control plane by running the following command:
3085
+
3186
[source,terminal]
@@ -98,4 +153,11 @@ $ oc logs deployments/istiod-ossm-3-v1-24-3 -n istio-system | grep 'Load signing
98153
[source,terminal]
99154
----
100155
2024-12-18T08:13:53.788959Z info pkica Load signing key and cert from existing secret istio-system/istio-ca-secret
101-
----
156+
----
157+
158+
ifeval::["{context}" == "cw-injection"]
159+
:!ossm-cluster-wide-istio-injection:
160+
endif::[]
161+
ifeval::["{context}" == "cw-injection-cm"]
162+
:!ossm-cert-manager-istio-injection:
163+
endif::[]

modules/ossm-migrating-a-cluster-wide-deployment-using-the-istio-revision-label.adoc

Lines changed: 67 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,17 @@
22
//
33
// * service-mesh-docs-main/migrating/cluster-wide/ossm-migrating-cluster-wide.adoc
44

5+
ifeval::["{context}" == "cw-revision"]
6+
:ossm-cluster-wide-istio-revision:
7+
endif::[]
8+
ifeval::["{context}" == "cw-revision-cm"]
9+
:ossm-cert-manager-istio-revision:
10+
endif::[]
11+
512
:_mod-docs-content-type: PROCEDURE
613
[id="ossm-migrating-a-cluster-wide-deployment-using-the-istio-revision-label_{context}"]
7-
= Migrating a cluster-wide deployment by using the Istio revision label
14+
ifdef::ossm-cluster-wide-istio-revision[= Migrating a cluster-wide deployment by using the Istio revision label]
15+
ifdef::ossm-cert-manager-istio-revision[= Migrating a cluster-wide deployment by using the Istio revision label with cert-manager]
816

917
You can perform a canary upgrade with the gradual migration of data plane namespaces for a cluster-wide deployment by using the `istio.io/rev` label.
1018

@@ -15,17 +23,63 @@ You can follow these same steps with your own workloads.
1523
.Prerequisites
1624

1725
* You have deployed {ocp-product-title} 4.14 or later.
18-
* You are logged in to the {ocp-product-title} web console as a user with the `cluster-admin` role.
26+
* You have logged in to the {ocp-product-title} web console as a user with the `cluster-admin` role.
1927
* You have completed the premigration checklists.
2028
* You have the {SMProduct} {SMv2Version} Operator installed.
2129
* You have the {SMProduct} 3 Operator installed.
22-
* You created an `IstioCNI` resource.
23-
* You have the `istioctl` tool installed.
24-
* You are running a cluster-wide Service Mesh control plane.
30+
* You have created an `IstioCNI` resource.
31+
* You have installed the `istioctl` tool.
32+
ifdef::ossm-cluster-wide-istio-revision[]
33+
* You are running a cluster-wide Service Mesh control plane resource.
34+
endif::[]
35+
ifdef::ossm-cert-manager-istio-revision[]
36+
* You are using the cert-manager and istio-csr tools in a cluster-wide deployment.
37+
* Your {SMProduct} {SMv2Version} `ServiceMeshControlPlane` resource is configured with the cert-manager tool.
38+
endif::[]
2539
* You have installed the `bookinfo` application.
2640
2741
.Procedure
2842

43+
ifdef::ossm-cert-manager-istio-revision[]
44+
. Confirm that your {SMProduct} 2 `ServiceMeshControlPlane` resource is configured with the cert-manager tool.
45+
+
46+
.Example `ServiceMeshControlPlane` cert-manager configuration
47+
[source,yaml]
48+
----
49+
apiVersion: maistra.io/v2
50+
kind: ServiceMeshControlPlane
51+
metadata:
52+
name: basic
53+
namespace: istio-system
54+
spec:
55+
...
56+
security:
57+
certificateAuthority:
58+
cert-manager:
59+
address: cert-manager-istio-csr.istio-system.svc:443
60+
type: cert-manager
61+
dataPlane:
62+
mtls: true
63+
identity:
64+
type: ThirdParty
65+
manageNetworkPolicy: false
66+
----
67+
68+
. Update the `istio-csr` deployment to include your {SMProduct} 3 control plane by running the following command:
69+
+
70+
[source,terminal]
71+
----
72+
helm upgrade cert-manager-istio-csr jetstack/cert-manager-istio-csr \
73+
--install \
74+
--reuse-values \
75+
--namespace istio-system \
76+
--wait \
77+
--set "app.istio.revisions={basic,ossm-3-v1-24-3}" <1>
78+
----
79+
+
80+
<1> The `app.istio.revisions` field must include your {SMProduct} 3.0 control plane revision _before_ you create your `Istio` resource so that proxies can properly communicate with the {SMProduct} 3.0 control plane.
81+
endif::[]
82+
2983
. Identify the namespaces that contain a 2.6 control plane by running the following command:
3084
+
3185
[source,terminal]
@@ -91,4 +145,11 @@ $ oc logs deployments/istiod-ossm-3-v1-24-3 -n istio-system | grep 'Load signing
91145
[source,terminal]
92146
----
93147
2024-12-18T08:13:53.788959Z info pkica Load signing key and cert from existing secret istio-system/istio-ca-secret
94-
----
148+
----
149+
150+
ifeval::["{context}" == "cw-revision"]
151+
:!ossm-cluster-wide-istio-revision:
152+
endif::[]
153+
ifeval::["{context}" == "cw-revision-cm"]
154+
:!ossm-cert-manager-istio-revision:
155+
endif::[]

modules/ossm-migrating-workloads-using-the-istio-injection-label.adoc

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,17 @@
22
//
33
// * service-mesh-docs-main/migrating/cluster-wide/ossm-migrating-cluster-wide.adoc
44

5+
ifeval::["{context}" == "cw-injection"]
6+
:ossm-cluster-wide-istio-injection:
7+
endif::[]
8+
ifeval::["{context}" == "cw-injection-cm"]
9+
:ossm-cert-manager-istio-injection:
10+
endif::[]
11+
512
:_mod-docs-content-type: PROCEDURE
613
[id="ossm-migrating-workloads-using-the-istio-injection-label_{context}"]
7-
= Migrating workloads by using the istio injection label
14+
ifdef::ossm-cluster-wide-istio-injection[= Migrating workloads by using the Istio injection label]
15+
ifdef::ossm-cert-manager-istio-injection[= Migrating workloads by using the Istio injection label with cert-manager]
816

917
Now you can migrate your workloads from the {SMProduct} 2.6 control plane to the {SMproduct} 3.0 control plane.
1018

@@ -110,4 +118,11 @@ The output shows that the `productpage-v1` deployment is the only deployment tha
110118
[NOTE]
111119
====
112120
Remove the `maistra.io/ignore-namespace="true"` label only after the 2.6 control plane has been uninstalled.
113-
====
121+
====
122+
123+
ifeval::["{context}" == "cw-injection"]
124+
:!ossm-cluster-wide-istio-injection:
125+
endif::[]
126+
ifeval::["{context}" == "cw-injection-cm"]
127+
:!ossm-cert-manager-istio-injection:
128+
endif::[]

modules/ossm-migrating-workloads-using-the-istio-revision-label.adoc

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,17 @@
22
//
33
// * service-mesh-docs-main/migrating/checklists/ossm-migrating-cluster-wide.adoc
44

5+
ifeval::["{context}" == "cw-revision"]
6+
:ossm-cluster-wide-istio-revision:
7+
endif::[]
8+
ifeval::["{context}" == "cw-revision-cm"]
9+
:ossm-cert-manager-istio-revision:
10+
endif::[]
11+
512
:_mod-docs-content-type: PROCEDURE
613
[id="ossm-migrating-workloads-using-the-istio-revision-label_{context}"]
7-
= Migrating workloads by using the Istio revision label
14+
ifdef::ossm-cluster-wide-istio-revision[= Migrating workloads by using the Istio revision label]
15+
ifdef::ossm-cert-manager-istio-revision[= Migrating workloads by using the Istio revision label with cert-manager]
816

917
Now you can migrate your workloads from the {SMProduct} 2.6 control plane to the {SMproduct} 3.0 control plane.
1018

@@ -114,3 +122,10 @@ The previous output shows that the `productpage-v1` deployment is the only deplo
114122
====
115123
Do not remove the `maistra.io/ignore-namespace="true"` label until the 2.6 control plane is uninstalled.
116124
====
125+
126+
ifeval::["{context}" == "cw-revision"]
127+
:!ossm-cluster-wide-istio-revision:
128+
endif::[]
129+
ifeval::["{context}" == "cw-revision-cm"]
130+
:!ossm-cert-manager-istio-revision:
131+
endif::[]

0 commit comments

Comments
 (0)