Skip to content

Commit 8dd700b

Browse files
authored
Merge pull request #92614 from shreyasiddhartha/OSSM-9338
OSSM-9338 Document Istio control plane update strategy: RevisionBased strategy
2 parents 72202b8 + c65b7e8 commit 8dd700b

10 files changed

+662
-87
lines changed

modules/ossm-attach-workloads-to-control-plane-revisionbased.adoc

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

modules/ossm-preparing-to-update-istio-control-plane-with-inplace.adoc renamed to modules/ossm-installing-istio-with-inplace-strategy.adoc

Lines changed: 39 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,27 @@
22
// update/ossm-updating-openshift-service-mesh.adoc
33

44
:_mod-docs-content-type: PROCEDURE
5-
[id="preparing-to-update-istio-control-plane-with-inplace_{context}"]
6-
= Preparing to update Istio control plane with InPlace strategy
5+
[id="installing-istio-with-inplace-strategy_{context}"]
6+
= Installing with InPlace update strategy
77

8-
You can configure the {istio} control plane and workloads for the `InPlace` update strategy. When using the `InPlace` strategy, the `IstioRevision` resource created by the {SMProduct} Operator always uses the same name as the `{istio}` resource.
8+
You can install the {istio} control plane, {istio} CNI, and the Bookinfo demo application using the `Inplace` update strategy.
9+
10+
[NOTE]
11+
====
12+
You can skip this installation procedure if the cluster already includes an {istio} deployment.
13+
====
14+
15+
When using the `InPlace` strategy, the `IstioRevision` resource created by the {SMProduct} Operator always uses the same name as the `{istio}` resource.
916

1017
.Procedure
1118

19+
. Create the `istio-system` namespace by running the following command:
20+
+
21+
[source,terminal]
22+
----
23+
$ oc create ns istio-system
24+
----
25+
1226
. Attach the workloads to a control plane deployed using the `InPlace` strategy:
1327

1428
.. Label the namespace to automatically include all workloads by entering the following command:
@@ -20,7 +34,7 @@ $ oc label namespace <namespace_name> istio.io/rev=<revision_name>
2034

2135
.. Apply the revision label to individual workloads by modifying the pod template in the `Deployment` resource. For example:
2236
+
23-
[source,yaml, subs="attributes,verbatim"]
37+
[source,yaml]
2438
----
2539
apiVersion: apps/v1
2640
kind: Deployment
@@ -40,7 +54,7 @@ $ oc label namespace <namespace_name> istio-injection=enabled
4054

4155
. Deploy the {istio} control plane using the `InPlace` update strategy. The following example configuration creates an `{istio}` resource named `default` in the `istio-system` namespace:
4256
+
43-
[source,yaml, subs="attributes,verbatim"]
57+
[source,yaml]
4458
----
4559
apiVersion: sailoperator.io/v1
4660
kind: Istio
@@ -55,7 +69,7 @@ spec:
5569

5670
. Install the {istio} CNI plugin with the desired version. The following example configuration creates an `IstioCNI` resource named `default` in the `istio-cni` namespace:
5771
+
58-
[source,yaml, subs="attributes,verbatim"]
72+
[source,yaml]
5973
----
6074
apiVersion: sailoperator.io/v1
6175
kind: IstioCNI
@@ -75,16 +89,33 @@ spec:
7589
$ oc create ns bookinfo
7690
----
7791

92+
.. Label the `bookinfo` namespace to enable sidecar injection by running the following command:
93+
+
94+
[source,terminal]
95+
----
96+
$ oc label namespace bookinfo istio-injection=enabled
97+
----
98+
7899
.. Install the `bookinfo` pods in the `bookinfo` namespace by running the following command:
79100
+
80101
[source,terminal]
81102
----
82103
$ oc apply -f https://raw.githubusercontent.com/openshift-service-mesh/istio/release-1.24/samples/bookinfo/platform/kube/bookinfo.yaml -n bookinfo
83104
----
84105

85-
. Label the `bookinfo` namespace to enable sidecar injection by running the following command:
106+
. Review the `Istio` resource by running the following command:
86107
+
87108
[source,terminal]
88109
----
89-
$ oc label namespace bookinfo istio-injection=enabled
110+
$ oc get istio -n istio-system
111+
----
112+
+
113+
.Example output
114+
+
115+
[source,terminal]
90116
----
117+
NAME REVISIONS READY IN USE ACTIVE REVISION STATUS VERSION AGE
118+
default 1 1 1 default Healthy v1.24.3 115s
119+
----
120+
+
121+
The `IN USE` field shows `1` because both the namespace label and the injected proxies reference the `IstioRevision` resource.
Lines changed: 134 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,134 @@
1+
// Module included in the following assemblies:
2+
3+
// update/ossm-updating-openshift-service-mesh.adoc
4+
5+
:_mod-docs-content-type: PROCEDURE
6+
[id="installing-istio-with-revisionbased-strategy-istiorevisiontag_{context}"]
7+
= Installing Istio with RevisionBased strategy and IstioRevisionTag
8+
9+
You can install the {istio} control plane, `IstioRevisionTag` resource, {istio} CNI, and the Bookinfo demo application using the `RevisionBased` update strategy.
10+
11+
[NOTE]
12+
====
13+
You can use the following section to understand the update process. You can skip this installation if the cluster already includes an {istio} deployment.
14+
====
15+
16+
.Procedure
17+
18+
. Create the `istio-system` namespace by running the following command:
19+
+
20+
[source,terminal]
21+
----
22+
$ oc create ns istio-system
23+
----
24+
25+
. Deploy the {istio} control plane using the `RevisionBased` update strategy. The following example configuration creates an `{istio}` resource named `default` in the `istio-system` namespace:
26+
+
27+
.Example configuration
28+
[source,yaml]
29+
----
30+
apiVersion: sailoperator.io/v1
31+
kind: Istio
32+
metadata:
33+
name: default
34+
spec:
35+
namespace: istio-system
36+
updateStrategy:
37+
type: RevisionBased
38+
version: v1.24.3
39+
----
40+
41+
. Create an `IstioRevisionTag` resource. The following example configuration creates an `IstioRevisionTag` resource named `default`:
42+
+
43+
.Example configuration
44+
[source,yaml]
45+
----
46+
apiVersion: sailoperator.io/v1
47+
kind: IstioRevisionTag
48+
metadata:
49+
name: default
50+
spec:
51+
targetRef:
52+
kind: Istio
53+
name: default
54+
----
55+
+
56+
Verify that the `targetRef` field points to the desired `{istio}` resource. In the example above, the `IstioRevisionTag` references the `{istio}` resource named `default`.
57+
58+
. Create the `istio-cni` namespace by running the following command:
59+
+
60+
[source,terminal]
61+
----
62+
$ oc create ns istion-cni
63+
----
64+
65+
. Install the {istio} CNI plugin with the desired version. The following example configuration creates an `IstioCNI` resource named `default` in the `istio-cni` namespace:
66+
+
67+
.Example configuration
68+
[source,yaml]
69+
----
70+
apiVersion: sailoperator.io/v1
71+
kind: IstioCNI
72+
metadata:
73+
name: default
74+
spec:
75+
version: v1.24.3
76+
namespace: istio-cni
77+
----
78+
79+
. Configure application workloads to run in the cluster. The following example deploys the `bookinfo` application in the `bookinfo` namespace.
80+
81+
.. Create the `bookinfo` namespace by running the following command:
82+
+
83+
[source,terminal]
84+
----
85+
$ oc create ns bookinfo
86+
----
87+
88+
.. Label the `bookinfo` namespace to enable sidecar injection by running the following command:
89+
+
90+
[source,terminal]
91+
----
92+
$ oc label namespace bookinfo istio-injection=enabled
93+
----
94+
95+
.. Install the `bookinfo` pods in the `bookinfo` namespace by running the following command:
96+
+
97+
[source,terminal]
98+
----
99+
$ oc apply -f https://raw.githubusercontent.com/openshift-service-mesh/istio/release-1.24/samples/bookinfo/platform/kube/bookinfo.yaml -n bookinfo
100+
----
101+
102+
. Review the `IstioRevisionTag` resource by running the following command:
103+
+
104+
[source,terminal]
105+
----
106+
$ oc get istiorevisiontag
107+
----
108+
+
109+
.Example output
110+
+
111+
[source,terminal]
112+
----
113+
NAME STATUS IN USE REVISION AGE
114+
default Healthy True default-v1-24-3 2m46s
115+
----
116+
+
117+
The `IN USE` field shows `True` because both active workloads and the `bookinfo` namespace now reference the tag.
118+
119+
. Confirm that the proxy version matches the control plane version by running the following command:
120+
+
121+
[source,terminal]
122+
----
123+
$ istioctl proxy-status
124+
----
125+
+
126+
The `VERSION` column should match the control plane version.
127+
+
128+
.Example output
129+
+
130+
[source,terminal]
131+
----
132+
NAME TYPE READY STATUS IN USE VERSION AGE
133+
default-v1-24-3 Local True Healthy True v1.24.3 5m31s
134+
----
Lines changed: 126 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,126 @@
1+
// Module included in the following assemblies:
2+
3+
// update/ossm-updating-openshift-service-mesh.adoc
4+
5+
:_mod-docs-content-type: PROCEDURE
6+
[id="installing-istio-with-revisionbased-strategy_{context}"]
7+
= Installing Istio with RevisionBased strategy
8+
9+
You can install the {istio} control plane, {istio} CNI, and the Bookinfo demo application using the `RevisionBased` update strategy.
10+
11+
[NOTE]
12+
====
13+
You can use the following section to understand the update process. You can skip this installation if the cluster already includes an {istio} deployment.
14+
====
15+
16+
.Procedure
17+
18+
. Create the `istio-system` namespace by running the following command:
19+
+
20+
[source,terminal]
21+
----
22+
$ oc create ns istio-system
23+
----
24+
25+
. Deploy the {istio} control plane using the `RevisionBased` update strategy. The following example configuration creates an `{istio}` resource named `default` in the `istio-system` namespace:
26+
+
27+
.Example configuration
28+
[source,yaml]
29+
----
30+
apiVersion: sailoperator.io/v1
31+
kind: Istio
32+
metadata:
33+
name: default
34+
spec:
35+
namespace: istio-system
36+
version: v1.24.3
37+
updateStrategy:
38+
type: RevisionBased
39+
----
40+
41+
. Install the {istio} CNI plugin with the desired version. The following example configuration creates an `IstioCNI` resource named `default` in the `istio-cni` namespace:
42+
+
43+
.Example configuration
44+
[source,yaml]
45+
----
46+
apiVersion: sailoperator.io/v1
47+
kind: IstioCNI
48+
metadata:
49+
name: default
50+
spec:
51+
version: v1.24.3
52+
namespace: istio-cni
53+
----
54+
55+
. Get the `IstioRevision` name by running the following command:
56+
+
57+
[source,terminal]
58+
----
59+
$ oc get istiorevision -n istio-system
60+
----
61+
+
62+
.Example output
63+
[source,terminal]
64+
----
65+
NAME TYPE READY STATUS IN USE VERSION AGE
66+
default-v1-24-3 Local True Healthy False v1.24.3 3m4s
67+
----
68+
+
69+
The `IstioRevision` name is in the format `<istio_resource_name>-<version>`.
70+
71+
. Configure application workloads to run in the cluster. The following example deploys the `bookinfo` application in the `bookinfo` namespace:
72+
73+
.. Create the `bookinfo` namespace by running the following command:
74+
+
75+
[source,terminal]
76+
----
77+
$ oc create ns bookinfo
78+
----
79+
80+
.. Label the `bookinfo` namespace to enable sidecar injection by running the following command:
81+
+
82+
[source,terminal]
83+
----
84+
$ oc label namespace bookinfo istio.io/rev=<revision_name>
85+
----
86+
87+
.. Install the `bookinfo` pods in the `bookinfo` namespace by running the following command:
88+
+
89+
[source,terminal]
90+
----
91+
$ oc apply -f https://raw.githubusercontent.com/openshift-service-mesh/istio/release-1.24/samples/bookinfo/platform/kube/bookinfo.yaml -n bookinfo
92+
----
93+
94+
. Review the `Istio` resource by running the following command:
95+
+
96+
[source,terminal]
97+
----
98+
$ oc get istio -n istio-system
99+
----
100+
+
101+
.Example output
102+
+
103+
[source,terminal]
104+
----
105+
NAME REVISIONS READY IN USE ACTIVE REVISION STATUS VERSION AGE
106+
default 1 1 1 default-v1-24-3 Healthy v1.24.3 5m13s
107+
----
108+
+
109+
The `IN USE` field shows `1` after you deploy the application.
110+
111+
. Confirm that the proxy version matches the control plane version by running the following command:
112+
+
113+
[source,terminal]
114+
----
115+
$ istioctl proxy-status
116+
----
117+
+
118+
The `VERSION` column should match the control plane version.
119+
+
120+
.Example output
121+
+
122+
[source,terminal]
123+
----
124+
NAME TYPE READY STATUS IN USE VERSION AGE
125+
default-v1-24-3 Local True Healthy True v1.24.3 5m31s
126+
----

0 commit comments

Comments
 (0)